I am attempting to modify one of my text input boxes in a form that I have. I would like suggestions to pop up as the user types. Basically, I would like to emulate the "Tags" box that is on the ask question pages here on Stack Overflow, but with different data as the suggestions obviously. How would I go about doing this?
For context, this is for a club at a college, and I am trying to allow members to type in their majors and as they type have a suggestions come up.
This snippet from Cena Mayo did just what I was looking for:
<input id="color" list="suggestions">
<datalist id="suggestions">
<option value="Black">
<option value="Red">
<option value="Green">
<option value="Blue">
<option value="White">
</datalist>
Documentation
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