Turn off autocomplete on a form input field
I was hunting High and low for the correct HTML markup to turn off autocomplete functionality for a form text input. Its extemely simple to use, simply include it into you input tag like so:
<input type="text" name="yourFieldName" autocomplete="off" />
This should stop your input from autocompleting, which can be useful in situations like credit card inputs and such











July 10th, 2010
Only problem with this solution is that it will fail W3C validation for XHTML Transitional. If that is the case and you really want it to validate, then you can simply do an on document load javascript routine to turn off autocomplete and still validate your XHTML.
« Reply