This is the NTH day of my participation in the August More Text Challenge
The HTML autocomplete attribute provides a variety of options for the field. Its purpose is to indicate to the browser whether the value should be filled in automatically when appropriate.
Autocomplete allows the browser to predict the entry of fields. When the user starts typing in the field, the browser should display the options to fill in the field based on the values you typed earlier.
Its two most common general values are:
on
– the default. Allows the browser to type automatically. No guidance is provided on the data types expected in this field, so the browser can use its own judgment.off
The browser does not allow you to automatically enter or select a value for this field. Documents or applications may provide their own auto-complete functionality or require that the value of this field not be entered automatically for security reasons.- The complete
autocomplete
Values are available atValues.
Note: Many modern browsers deliberately ignore the off value on certain fields in some cases in order to give the user more control over the auto-fill field. One example is using a password manager.
<input autocomplete="on|off" />
Copy the code
Here’s another commonly used value, new-password, which will be used in the password entry box.
new-password
New-password — This value can be used when the user is asked to create a new password (for example, a registration or reset password entry box). This value ensures that the browser does not accidentally fill in an existing password and also allows the browser to suggest a secure password:
<form action="signup" method="post">
<input type="text" autocomplete="username" />
<input type="password" autocomplete="new-password" />
<input type="submit" value="Registered" />
<button type="reset">reset</button>
</form>
Copy the code
Also, if the form contains a second password field that requires the user to retype the newly created password, both password fields should use Autocomplete =”new-password”.
Here are Chrome’s password managers, you can manage them under Settings/Autofill/Password:
Other Points for attention
The autocomplete property applies to the following controls: text, search, URL, tel, email, Password, Datepickers, range, and color.
Note: In some browsers, you may need to manually enable autocomplete (in the browser menu’s Parameter Settings).
Here’s how autoComplete is supported under Can I Use