How to disable auto-complete in HTML Form input field?


Hello, I would like to know, how I can disable HTML form input field auto-complete, done by chrome and other majore browsers.

Thanks


Asked by:- jaiprakash
0
: 72 At:- 12/21/2018 12:08:32 PM
HTML autocomplete off






1 Answers
profileImage Answered by:- jaya

You can have two ways to stop auto-complete of forms input field by:

1. Add autocomplete="off" onto <form> element

<form method="post" action="/form" autocomplete="off">
     First name:<input type="text" name="fname"><br>
     Last name: <input type="text" name="lname"><br>
</form>

2. OR you can disable auto complete on a particular form input field

<input type="email" name="email" autocomplete="off">

Any of the above will work and you can use it depending on your requirements.

1
At:- 12/23/2018 5:00:32 PM





Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use