my friends, I used a gravity form builder on my site.
For the input number field, I need to be able to increase or decrease the number with the + and – button.
As far as I know, two buttons can be added via JavaScript and given css.
Please help me with what JavaScript code can I do this?
The structure of the Gravity Form plugin field is as follows:
<div id="field_1_6" class="gfield gfield--width-full gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible">
<label class="gfield_label" for="input_1_6">
Number of People
<span class="gfield_required">
<span class="gfield_required gfield_required_asterisk">
*
</span>
</span>
</label>
<div class="ginput_container ginput_container_number">
<input name="input_6" id="input_1_6" type="number" step="any" value="" class="large" aria-required="true" aria-invalid="false">
</div>
</div>
2
Answers
I was able to solve this problem with JavaScript, I put the code here if anyone can encounter this problem can use it.
This code has no style, you can css it according to your taste