Wednesday, July 24, 2013

HTML5: Prevent browser form autofill

You hace to use autocomplete="off" in your form tag:

<form name="form1" id="form1" method="post" autocomplete="off"
      action="http://www.example.com/form.cgi">
      Name: <input type="text" name="text1" /><br/>
      Address: <input type="text" name="text2" /><br/>
      Phone: <input type="text" name="text3" /><br/>
      Password: <input type="password" name="password" /><br/>
     <input type="Submit" name="Submit" value="Submit" />
</form>

Reference:
https://developer.mozilla.org/en-US/docs/Mozilla/How_to_Turn_Off_Form_Autocompletion

No comments: