0
I need to get the value of all radio input (that are checked) of my page, has around 10 radio, the value is loaded directly from the database, but they are disabled because the user can not change the value, they are already checked, I need to pass the value of these checkbox disabled to the Hidden input, because as you may already know, disabled inputs do not have the data sent to php.
Follows code: https://jsfiddle.net/h3ept1r5/1/
<div class="form-group">
<input type="hidden" name="a">
<div class="radio">
<label for="yes1">
<input type="radio" name="a" id="yes1" checked> Yes
</label>
<label for="no1">
<input type="radio" name="a" id="no1"> No
</label>
</div>
</div>
<div class="form-group">
<input type="hidden" name="b">
<div class="radio">
<label for="yes2">
<input type="radio" name="b" id="yes2"> Yes
</label>
<label for="no2">
<input type="radio" name="b" id="no2" checked> No
</label>
</div>
</div>
<div class="form-group">
<input type="hidden" name="c">
<div class="radio">
<label for="yes3">
<input type="radio" name="c" id="yes3" checked> Yes
</label>
<label for="no3">
<input type="radio" name="c" id="no3"> No
</label>
</div>
</div>
<button class="btn btn-default">Submit</button>
If they already come from the server, IE, the server already "knows" which are selected, I did not understand the reason to take back the values.
– Bacco