In my database I have a required tinyint field that stores a 0 for false or a 1 for true. On my edit form I use a Form->checkbox(‘deleted’). There is an automatic hiddenField with a default value of zero. Therefore, if I check the box I get a 1 and if I un-check the box I should get a 0 but instead I get a message when I submit the form that says “Please check this box if you want to proceed.”
The HTML output is adding a required tag parameter which I believe is causing the issue.
How can I get the form to accept an un-checked checkbox with a value of 0
<input type="hidden" name="deleted" value="0"/><input type="checkbox" name="deleted" value="1" required="required" checked="checked">