How to disable autocomplete in custom forms

Article author
Josh Lopez
  • Updated

Using Memberstack 2.0? There is an updated version of this article here.

To turn off autocomplete on custom forms, you have to add the autocomplete="off" attribute to your <form> tag. Some browsers will ignore this though. A complete breakdown of this attribute can be seen here.

 

Quick example of code:

<form method="post" autocomplete="off">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="email">Email:</label>
<input type="text" id="email" name="email"><br><br>
<input type="submit">
</form>

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.