I want a specific usage on my website.
I made a simple select for now but I would like as last option item to include inputs so the user can enter a range.
Something like that :
<select>
<option>0-9</option>
<option>10-19</option>
<option>20-29</option>
<option>
<input type="number" name="min" min="0" max="30"/>
<input type="number" name="max" min="0" max="30"/>
</option>
</select>
But it for sure doesn’t work. Anyone has any idea how to do this properly ? Or maybe a different approach ?
2
Answers
You can try it https://codepen.io/Jonathan-Rodrigues-Cardoso/pen/WNmQKGo
You will have something like
You will have to customize the entire selection then if you want to add input fields to select, rather than this, you should consider adding a option of ‘Custom’ and after the person clicks on that, you should display input field, it is much more efficient then customizing the entire select.