php - Yii - Behaivor chekcbox -
I have the following problem that appears to be original: I have some HTML in some checkboxes, this:
& lt;? Php $ form & gt; Checkbox ($ certificate, 'a', array ('id' = & gt; 'a')); ? & Gt; When sending a post, the checkbox is not with the check, then send 0, and if the checkbox 1 sends, then I have this one in the same HTML:
< Code> & lt; Php $ form & gt; Checkbox ($ certificate, 'head', array ('id' => gt; 'head')); ? & Gt; With this last time, if checkbox is not sent to checkbox 0, but when to check, do not send anything. So far, I can not understand this behavior, can anyone help me?
Property types of your "certificate" model (whether they are strings or integers), I only Guess that you have not got anything to choose the "Head" checkbox that its type is not compatible with Booleans.
If your "head" type is set to string, try setting it in an integer.
Comments
Post a Comment