Monday, July 29, 2013

How to Turn Off Autocomplete for Input

Just add "autocomplete" attribute inside input tag like this:

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

This would be useful when a text input is one-off and unique. Like a CAPTCHA input, one-time use codes, or for when you have built your own auto-suggest/auto-complete feature and need to turn off the browser default.
Disqus Comments