How can I stop some text fields on my web page from using the autocomplete feature? I notice some sites I go to they're blank and some are filled in so there must be some way to turn it off for some fields.
And, as always...it probably depends on what browser you're using as to whether or not this works. I know it works in IE, but I don't think it does for others.
Hope This Helps!
Ecobb
"My work is a game, a very serious game." - M.C. Escher
I don't think it's a matter of individually turning them off, but rather it's inherent to the way autocomplete works (as I understand it). IE is looking at the name of the form field and then pulls up a list of things you've previously entered for that same field name. E.g., "first" as the name for a first name field, or "firstname," etc. When the name of the field is different then it can't guess.
As such, you can choose non-obvious names if you don't want autocomplete to pull stuff from other sites ("field27" or "firstnameGLAVEN").
If you want to make sure it's never used for a particular field (but can be used for others) and you're generating pages dynamically, you can name the fields with a random bit on the end (that you strip off when processing the form), like "firstname-241505", with the number being randomly generated every time the page is served. Not perfect, but if the random bit is long enough it's quite unlikely that autocomplete will fire.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.