I have a text input where people type and send text. I don't want the text box to have a drop down box with suggestions based on previous inputs. How do i remove this textbox drop down box? (I know its gonna be a simple 1 line of code but I can't find it :P)
Double-click the text field so the drop-down box containing the autofill suggestions appears. Hold your mouse over the option that you want to remove from autofill to highlight it. Don't click on it. Press the "delete" key on your keyboard.
Add autocomplete="off" onto <form> element; Add hidden <input> with autocomplete="false" as a first children element of the form.
The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.
Approach: Create a div with the class as a container. Inside of this div, create another div with a class as a text-container that will contain the <input> tag & <datalist> tag. Declare the list attribute as programmingLanguages inside the <input> tag.
Try this attribute in your input tag:
autocomplete="off"
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