How to autocomplete the user's first name in an HTML input box?
I have a simple bootstrap form. In this form, in the first input box, I ask for name. I want to enable autocomplete. The user shall be able to select the first name, like a form where if you click you have all data the user usually enters in similar forms. How can I achieve that?
<input type="text" class="form-control" id="name" aria-required="true">
Solution 1:
There is an attribute called autocomplete in HTML forms. For the first name you could use autocomplete="given-name
and last name would be autocomplete="family-name"
.
There is more information at MDN Web Docs