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">
There is an attribute called autocomplete on HTML tags that are related to forms. For the first name you could specify autocomplete="given-name"
and for the last name you could use autocomplete="family-name"
.
There is more information at MDN Web Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With