I've got the following error when i'm sending the form, to be exact with radio button input.
Here is the HTML Code:
<input name="radio" type="radio" class="raido-btn" id="coral1" value="coral1" />
<label for="coral1">CORAL I</label>
<input name="radio" type="radio" class="raido-btn" id="coral2" value="coral2" />
<label for="coral2">CORAL II</label>
<input name="radio" type="radio" class="raido-btn" id="coral3" value="coral3" />
<label for="coral3">CORAL III</label>
Here is the Javascript code:
if($('#coral1').prop('checked')){
apartamentos = 'Coral 1';
}
else if($('#coral2').prop('checked')){
apartamentos = 'Coral 2';
}
else if($('#coral3').prop('checked')){
apartamentos = 'Coral 3';
}
I don't know how to set the variable "apartamentos" to the radio button which is checked.
It always set the variable apartamentos = 'Coral'
Thanks in advance
apartamentos = $('.raido-btn:checked').val()