0

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:

Example

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!

James
  • 172
  • 1
  • 1
  • 13
  • 2
    So do you want a dropdown or an input field? – kmoser May 24 '20 at 03: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 May 24 '20 at 05:48

1 Answers1

2

I 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

Joundill
  • 6,828
  • 12
  • 36
  • 50