Is there an attribute that makes it so you have the “searchable” list but it does not allow freeform entry? ie anything that isn’t in the list is not permitted? I imagine you can do this with validation of the input by the next page but it would seem better for it to be possible to restrict it in the first place? I can think of options (ie Country) where searchable is helpful but you don’t want freeform entry too?
What if i want to add an option of more than a word like that ?
< option value=nosauce> < /option >
without make the form consider it as another attribute ?
Hi
in the exercise dont have type="text attribute as mentioned at the begining of this lesson and showed in the example but still display dropdown correctly. why?
My browser is rendering the “value” inside the option, and the option itself. Because of that, datalist input is being displayed in an apparently duplicate way (just not the first letter in capital letter).
Is this a new browser rendering model? Are there any new practices to be adopted on this, if this is the new standard?
I’m working on this now. Once I completed this part, I look to see of I can type in index.html and it still only comes down with a dropdown. I’m using Google Chrome by the way. What am I doing wrong? Codecaedamy is giving me a check so it seems to be saying there is nothing wrong? Image 8-6-20 at 11.36 AM|690x247
My datalist is showing up as a blank text box. I have even pasted the above example and i get the same blank text box. Am I missing something that would turn it from text to a drop down list?
datalist elements have an endtag which means there is a text node.That is where the literal value should be written. What we write in the value attribute is arbitrary. It can be a number, a letter, an abbreviation, or whatever.