1

I am running into issues with Chrome autofill behavior on several forms.

The fields are a standard inputs with name such as 'email', 'firstName' and 'phoneNumber' but if I turn autocomplete="off" then it doesn't populate those fields with the values that I've stored in them and still want populated so I can't do that.

The behavior would be ok except that Chrome is filling the inputs incorrectly, for example when you start typing in the email field firstName options are in the dropdown list to autofill.

Are there any quirks with the autofill behavior that could be used to fix this?

April_Nara
  • 932
  • 2
  • 12
  • 36
  • Refer to http://stackoverflow.com/questions/18531437/stop-google-chrome-auto-fill-the-input Setting `value=""` prevents this auto-fill behavior – Akshay Sharma Jul 01 '14 at 19:41
  • Thanks. That led me to the right answer which was not to explicitly fill the value="" but I was able to set value="%{explicit_value}". That did the trick. – April_Nara Jul 01 '14 at 20:36
  • Please check my workaround here: http://stackoverflow.com/questions/15738259/disabling-chrome-autofill/36030236#36030236 – Fareed Alnamrouti Mar 16 '16 at 08:29

3 Answers3

4

weird trick to disable autofill as of may 2015, you can disable it by setting autocomplete="false" instead of autocomplete="off"

This will prevent chrome from autofilling form

Yannick Richard
  • 1,079
  • 13
  • 24
0

Refer to Stop Google chrome auto fill the input

Setting value="" prevents this auto-fill behavior.

Community
  • 1
  • 1
Akshay Sharma
  • 541
  • 1
  • 4
  • 13
0

Have you tried:

autocomplete="new-password"

At first glance this may look silly but ...

In some cases, the browser will keep suggesting autocompletion values even if the autocomplete attribute is set to off. This unexpected behavior can be quite puzzling for developers. The trick to really forcing the no-autocompletion is to assign a random string to the attribute --- https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Carlene
  • 237
  • 2
  • 10