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.


Asked by:- jaiprakash
: 346 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>

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.

At:- 12/23/2018 5:00:32 PM
Thanks, It solved my issue. 0
By : jaiprakash - at :- 5/6/2020 11:14:38 AM

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

Full Name *

Email *

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

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly