Yii - Behaivor chekcbox

I have the following problem that seems to be basic: I have a HTML, to some checkbox, this:


<? php echo $ form> checkBox ($ certificate, 'a', array ('id' => 'a')); ?>

When sending the POST, if the checkbox is not with the check, send 0, and if checkbox sends 1, the same HTML I have this one:


<? php echo $ form> checkBox ($ certificate, 'head', array ('id' => 'head')); ?>

With this last time, if the checkbox is not check sent 0, but when to check, send nothing. So far I do not understand this behavior, can someone help me?

This is checkBox method from CActiveForm? As far as I know without the “uncheckValue” and “value” options it should send 1 when checked and nothing if unchecked. If you experience different behavior it’s probably because of the rules or default values for the attribute or some other factor.