I need to pass the value of a checkbox to a corresponding hidden form field when the checkbox is clicked. The value of the hidden field also needs to return to null when the checkbox is unticked. There area a whole series of checkboxes and hidden fields as per the code below.
For example if checkbox id="productfinishID_115" is checked then the value of id="productfinishID_txt_11
5" should = 115 and vice versa.
<input type="checkbox" id="productfinishID_115" name="productfinishID" value="115" >
<input name="productprice" type="text" id="productprice_115" size="6">
<input name="productunits" type="text" id="productunits_115" size="6">
<input name="productfinishID_txt"
type="hidden" id="productfinishID_txt_11
5">
<label for="productfinishID_115">
FSSS - Flat Plate Satin Stainless</label><br>
<input type="checkbox" id="productfinishID_110" name="productfinishID" value="110" >
<input name="productprice" type="text" id="productprice_110" size="6">
<input name="productunits" type="text" id="productunits_110" size="6">
<input name="productfinishID_txt"
type="hidden" id="productfinishID_txt_11
0">
<label for="productfinishID_110">
G - Georgian Polished Brass</label><br>
<input type="checkbox" id="productfinishID_111" name="productfinishID" value="111" >
<input name="productprice" type="text" id="productprice_111" size="6">
<input name="productunits" type="text" id="productunits_111" size="6">
<input name="productfinishID_txt"
type="hidden" id="productfinishID_txt_11
1">
<label for="productfinishID_111">
GB - Georgian Bronze</label><br>
<input type="checkbox" id="productfinishID_113" name="productfinishID" value="113" >
<input name="productprice" type="text" id="productprice_113" size="6">
<input name="productunits" type="text" id="productunits_113" size="6">
<input name="productfinishID_txt"
type="hidden" id="productfinishID_txt_11
3">
<label for="productfinishID_113">
GPB - Georgian Polished Brass</label><br>
Start Free Trial