'1', 'uncheckValue' => '0')); ?>
'subscribe', 'label' => 'Subscribe to newsletter')); ?>In this example, we create a checkbox input that is checked by default, with the label "Subscribe to newsletter". We also specify that the value of the checkbox should be 'subscribe'. The CHtml checkbox is part of the Yii framework's CHtml package library, which includes a range of HTML utility classes.