I am a novice web developer and I need to calculate the sum of some radio buttons with different values, then pass that result to an external payment server.
This is what one of the radio buttons looks like:
<div class='container'>
<label for='p_board_rental' ><strong>Paddleboard Rental</strong> (limited amount available*: </label><br/>
<input type='radio' name='rental' value='0'/><label class="radio"> No</label><br/>
<input type='radio' name='rental' value='20'/><label class="radio"> Yes</label><br/>
I need the final result calculated and then displayed but I have tried so many ways and I cannot get it to work properly! The best I can get is the empty box where the total SHOULD be appearing.
If you're using jQuery you can do something like:
tally will hold the sum of the selected values