Reasons to Use Autocomplete

The HTML The autocomplete attribute lets the developer decide if they want to enable the user to have automated assistance in filling out the form. You can determine where you want the automated responses to come from. They can come from values the user entered previously or pre-configured values the developer has decided upon.

HTML attribute: autocomplete

The HTML autocomplete attribute lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the browser as to the type of information expected in the field.

It is available on <input> elements that take a text or numeric value as input, <textarea> elements, <select> elements, and <form> elements.

The source of the suggested values is generally up to the browser; typically values come from past values entered by the user, but they may also come from pre-configured values. For instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes. Perhaps the browser offers the ability to save encrypted credit card information, for autocompletion following an authentication procedure.

If an <input>, <select> or <textarea> element has no autocomplete attribute, then browsers use the autocomplete attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form attribute of the element (see the <form> autocomplete attribute).

Note: In order to provide autocompletion, user-agents might require <input>/<select>/<textarea> elements to:

  1. Have a name and/or id attribute
  2. Be descendants of a <form> element
  3. The form to have a submit button

Source: Mozilla, https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.