-2

I am facing issue with autocomplete false. Can anyone please give the best solution for it?

current html:

<form name="register" action=""  method="">
<input type="text" id="email" placeholder="Username" name="email" autocomplete="false">
<input type="password" id="password" placeholder="Password" name="password" autocomplete="false" required>
<div id="submit" type="submit">Let me in!</div>
</form>
Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
sandip
  • 1
  • 5

2 Answers2

0

Remove all autocomplete from input fields and add:

<form action="" method="post" autocomplete="off"> in replacement of your initial <form> tag

This will disable the autocomplete completely on the form.

Option
  • 2,605
  • 2
  • 19
  • 29
  • I want blank fields When i logged out from the page and return back to login page. When i back to login page the details already filled in the input boxes. – sandip Aug 02 '16 at 10:00
  • They won't be blank if you have automatically saved the input fields to your browser. This code will 100% work otherwise. – Option Aug 02 '16 at 10:02
0

There is a glitch where it autocomplete on the last input field.

A simple trick is to add input text field with:

style="display: none;" 

as the last input field.