I hope y'all are good!
Can you help me to make this quantity picker from Dropdown to be like this one with - and + buttons:
I want to do this feature on this code:
<div style="" class="fields">
<div class="options">
<span class="text">Quantity</span><p>:</P>
<select id="quantityF" name="entry" placeholder="Quantity" required>
<option style="font-size:12px" value="1" selected disabled hidden>1</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
Thank you so much guys in advance for your help!
I hope y'all are good!
Can you help me to make this quantity picker from Dropdown to be like this one with - and + buttons:
I want to do this feature on this code:
<div style="" class="fields">
<div class="options">
<span class="text">Quantity</span><p>:</P>
<select id="quantityF" name="entry" placeholder="Quantity" required>
<option style="font-size:12px" value="1" selected disabled hidden>1</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
Thank you so much guys in advance for your help!
Share Improve this question asked May 24, 2020 at 3:00 JamesJames 1721 gold badge1 silver badge14 bronze badges 2- 2 So do you want a dropdown or an input field? – kmoser Commented May 24, 2020 at 3:25
- @kmoser I want quantity picker like the one in the image I've attached with question above, if you have example about input field to see if it can do the job I want or no – James Commented May 24, 2020 at 5:48
1 Answer
Reset to default 2I think you're looking for an <input type="number">
, not a <select>
. There's a w3schools example here.
It's possible to style the increment/decrement buttons. I suggest referring to this Stack Overflow question