Share on facebook
Share on twitter

HTML5: Improving Forms With Autocomplete

To complete form input faster, browsers offer the option of autocompletion. The entries made by the user are saved and suggested when the same or a similar form with the same information is filled in. The problem is, that the variations of certain entries – e.g. a name or a credit card number – prevent the word completion from working properly. The new attribute „autocomplete“ unifies the labels of a number of these entries. Different Labels for Input Fields When creating an HTML form, the user can freely distribute the „name“ attributes that are important for the further processing of the content. When asking for the credit card number during a purchasing transaction, there is a multitude of names for said input field: „credit-card“ and „ccard“ are two examples. This variety of terms makes it impossible for the browser to recognize reliably when a credit card number has to be entered. For that reason, browsers can only offer autocompletion for input fields with identical „name“-attributes. Example of an Autocompletion The new attribute „autocomplete“ is meant to solve these problems. In contrast to the „name“ attribute, which can be defined freely, there are set values for „autocomplete“ that always stand for […]