1

I have a form where I want to turn off the autocomplete feature for some of the fields. In my tests, turning off the autocomplete is turning it off for the whole form, which is not what I want. This is what I do:

<form>
  <input name="a">
  <input name="b" autocomplete="off">
</form>

I have some questions:

  • Is this the expected behaviour? Not from what I have been reading ...
  • How can I disable autocomplete for just some fields?
blueFast
  • 33,335
  • 48
  • 165
  • 292
  • See this [StackOverflow answer](http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag) – Nathan White Jan 28 '13 at 11:22
  • My case is very specific: autocomplete="off" *is* working, but too broadly (all fields in the form, even by putting it in only one field). Is this expected? – blueFast Jan 28 '13 at 11:30
  • Whilst I don't pretend to know what you're problem truly is, there could be a number of problems: what browser are you testing this in? What is your HTML file `DOCTYPE`? You'll notice that in the other answer, someone mentions that "_...Autocomplete is only defined in the HTML 5 standards_" so if your `DOCTYPE` is wrong, you may be trying to apply an HTML5 standard on a non-HTML5 page. – Nathan White Jan 28 '13 at 11:36

0 Answers0