Answer the question
In order to leave comments, you need to log in
How to get the value of all inputs from the form when clicking on the button?
I have generated forms, when you click on the TAKE button, js should collect input data from this form and send it to the server.
How to get this data?
<form name="1">
<div class="voucher-offer">
<input type="hidden" name="id" value="11">
<input type="hidden" name="title" value="11">
<input type="hidden" name="cena" value="11">
<div id="buynow">
<button class="stripe-button voucher-offer__btn">TAKE</button>
</div>
</form>
<form name="2">
<div class="voucher-offer">
<input type="hidden" name="id" value="22">
<input type="hidden" name="title" value="22">
<input type="hidden" name="cena" value="22">
<div id="buynow">
<button class="stripe-button voucher-offer__btn">TAKE</button>
</div>
</form>
<form name="3">
<div class="voucher-offer">
<input type="hidden" name="id" value="33">
<input type="hidden" name="title" value="33">
<input type="hidden" name="cena" value="33">
<div id="buynow">
<button class="stripe-button voucher-offer__btn">TAKE</button>
</div>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question