7

I have tried to find a way to prevent browsers (mostly FF) to prevent auto-filling of my form. I don't mine auto complete, as they type in values it offers suggestions. But when I load a form in FF it auto fills the form with the previous values. But I want to always have the fields be blank on load.

I have tried using autocomplete="off" in the tag, but that does not work. Are there any solutions to this? I have looked for other questions and they all say to use that attribute, but it does not work for auto filling, it does for auto complete. Could I use JS/jQuery to do this?

skift
  • 979
  • 2
  • 12
  • 25
  • 2
    Possible duplicate: http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag – Anirudh Ramanathan Jul 17 '12 at 19:44
  • I guess he is happy with autocomplete - if I understood him correctly. But then I don't understand why would his browser auto-fill the previous values on page load. Are you sure there isn't any plugin/extension thats doing this ? – CodeExpress Jul 17 '12 at 19:47

2 Answers2

14

try this might work for you set autocomplete="off"

<input type="text" autocomplete="off" />

check : How to Turn Off Form Autocompletion

Pranay Rana
  • 164,177
  • 33
  • 228
  • 256
  • i mentioned in my post that i have tried that, and it does not work. FF still puts in the values from when the form was last filled in. I have tried it on the form and input tags. – skift Jul 17 '12 at 22:22
  • 3
    It seems that this answer does work. however, FF is very liberal at caching user inputs and repopulating them. So it is not an autocomplete but, it's just that FF likes to fill in a form, with values you have already filled them in with. I modified my js script to clear all fields on load and css to white (so the end user doesnt see text for a second, to have it dissapear) to prevent this. then when done loading, after removing the text, I return the text to default colors. – skift Sep 19 '12 at 23:52
  • 1
    FYI, this does not longer work with newer versions: https://bugzilla.mozilla.org/show_bug.cgi?id=956906 – FMCorz Jun 30 '14 at 06:26
0

New versions of Chrome and Mozilla don't recognize autocomplete="off" or autocomplete="false". I solved autocomplete issue using this js solution

Andrew
  • 627
  • 7
  • 16