1

I need an advice! I want to disable browser autofill in PS checkout form

I'll admit I've already tried: -autocomplete="off" on forms and all inputs and doesn't work;

  • I tried to replace autocomplete="off" with autocomplete="new-password" and create hidden inputs which acquires the id, name, data-field-name of the visible input that follows it, removing these attributes from the visible inputs when the user is in focus to trick the browser into resetting the 'blur' event on them; This seems to work but when I click to complete the order, I get the error: 'IntegrationError: For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.' or 'Unable to download payment manifest "https://www.google.com/pay". HTTP 500 Internal Server Error.' can someone help me? Thank you!!

1 Answer 1

0

Chrome browser tends to ignore autocomplete="off"

You need to use a name, id and autocomplete attribute value that the browser doesn’t recognize:

<input
  name="new-password"
  id="new-password"
  autocomplete="new-password"
>

Now consider that autocomplete="off" in HTML specs is a suggestion to the browser. It means there is no obligation or warranty it will not autocomplete.

Not the answer you're looking for? Browse other questions tagged or ask your own question.