8

In my HTML FORMs, when I focus certain text fields they list down history of values entered previously. Is it possible to avoid this auto-drop-down? I am not looking for some browser settings tips for my computer, instead, I want these settings for all of the users of my website filling a form.

Will it also be possible to apply these settings for some selected text fields only? as historical values for some text fields may be helpful for a particular user using his/her machine.

May be this could be achieved using Javascript, but no clue where to start from.

Thanks for your help.

PS: I am using PHP and Javascript (JQuery).

4
  • Name the field something crazy that they probably have never encountered before. :) Commented Jun 29, 2009 at 15:38
  • @Tim .. LOL .. but the solution I am looking for is for users using my website's forms again and again. Commented Jun 29, 2009 at 15:40
  • Ah, ok.. Please disregard my comment then. :) Commented Jun 29, 2009 at 15:45
  • Note that if you have autocomplete="off" on a password field, Firefox will not save the password. However, if the password is already saved, it will be populated in a password field, even if autocomplete="off". Commented Jun 29, 2009 at 16:07

3 Answers 3

18

Add the attribute autocomplete="off" to each of your form elements.

This is not part of the W3C HTML standard, but it does work in both Mozilla & IE browsers.

Sign up to request clarification or add additional context in comments.

7 Comments

I think this is an Internet Explorer specific thing.
In which standard is this defined? In which browser is this implemented?
It is not defined in any standard, but I haven't seen a browser that does autocomplete that does not obey this tag.
will it pass thru validation tests?
Invented by Microsoft, but now in HTML5 (w3.org/TR/html5/forms.html#the-autocomplete-attribute) and supported by all major browsers: en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)
|
3

Try autocomplete="off" in your <form> or <input> tag, see this Mozilla article, this MSDN page and this Safari Reference page for more info. Looks like Safari has only documented the use of the attribute on individual <input> tags though.

See also the answers to the question How can I prevent Firefox’s Autocomplete?

Comments

0

I think that this is implemented in firefox using an internal table with field names and their history. You can try to generate a custom name for your fields (like "name-asdfg" instead of just "name"), which results in a form generation and processing overhead (you must strip the nonsense from the end of the name).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.