I have a form with a checkbox. I also have a hidden field in that form with a different name. I need to have the hidden field's value populated when the checkbox is checked. If the checkbox is then unchecked, the value of the hidden field should also be reset back to nothing.
Code:
<input type="checkbox" name="user_can_use_data" id="user_can_use_data" value="" />
<input type="hidden" name="supplier_can_use_data" id="supplier_can_use_data" value="" />
I know a very simple bit of javascript should do the trick, but have not been able to figure it out...
Any ideas?