Manually type in a value in a "Select" / Drop-down HTML list?

Pretzel picture Pretzel · Dec 13, 2010 · Viewed 120.3k times · Source

In a Windows Forms application, a drop-down selector list also gives the user the option of typing an alternate value into that same field (assuming the developer has left this option enabled on the control.)

How does one accomplish this in HTML? It appears as if it is only possible to select values from the list.

If it's not possible to do this with straight HTML, is there a way to do this with Javascript?

Answer

Pottsy picture Pottsy · Dec 16, 2015

It can be done now with HTML5

See this post here HTML select form with option to enter custom value

<input type="text" list="cars" />
<datalist id="cars">
  <option>Volvo</option>
  <option>Saab</option>
  <option>Mercedes</option>
  <option>Audi</option>
</datalist>