title: CakePHP form helper - change value of hidden input for checkbox/radio
body: <p>Using CakePHP's form helper to generate a checkbox is easy enough; to use the example from the documentation:</p>
  
  <pre><code>    echo $this-&gt;Form-&gt;checkbox('done',array('value' =&gt; 555));
  </code></pre>
  
  <p>This will produce the following HTML:</p>
  
  <pre><code>&lt;input type="hidden" name="data[User][done]" value="0" id="UserDone_" /&gt;
  &lt;input type="checkbox" name="data[User][done]" value="555" id="UserDone" /&gt;
  </code></pre>
  
  <p>This is all well and good, and the hidden field serves to force submission of a value for the "done" field even if the box remains unchecked.</p>
  
  <p>Now, for the sake of argument, let's say the database definition of this field is <code>ENUM('yes','no')</code>. Of course I can easily change the value of the checkbox to "yes".  However, if it's unchecked, a value of "0" is submitted from the hidden element.  This produces no error or warning from mysql, as 0 is always a legal value for an enum field; it appears as an empty string.</p>
  
  <p>Can I change value of the hidden field that CakePHP generates (to "no"), or do I need to suppress the auto-generation and create the hidden field myself?  (An annoyance that grows with the number of checkboxes.)</p>
  
  <p>I believe this all applies to radio button groups, too&mdash;at least if they don't have a default selection.</p>
  
  <p>I'm using CakePHP 1.3. Thanks.</p>