Daniel Vaca Daniel Vaca - 8 months ago 39
HTML Question

How to make mobile <select> allow typing an option instead of selecting one.

Suppose I have a the following selection options:

<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>

On a PC I can select "audi" by typing "a". But on a mobile device I have to scroll and select "audi". Is there a way to make mobile devices use a qwerty keyboard instead of a scroll list?


That is not possible. Instead, you can use autocomplete from jQuery UI to achieve the same.

Try this https://jqueryui.com/autocomplete/

[EDIT] <Datalist> is also there. But, trust me, it is real slow for larger list of options.