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).
The reset() method resets the values of all elements in a form (same as clicking the Reset button). Tip: Use the submit() method to submit the form.
Use the <input> tag with autocomplete attribute. Set the autocomplete attribute to value “off”.
Click the Display tab. Do one of the following: To enable AutoComplete for the text box, select the Enable AutoComplete check box. To disable AutoComplete for the text box, clear the Enable AutoComplete check box.
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.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With