Checkboxes normally don't submit a value when they submitted in a form and they are not checked. This code makes a hidden input have a value which is coupled to the checkbox check state, the hidden input will always deliver a value when the form is submitted.