Two lines of code in Yii.
How to surround a checkbox with a <label> tag and display your text? (now 'Only Crash' is displayed in the label) ???
<div class="form"> <?php $form = $this->beginWidget('CActiveForm'); ?> <?php print $form->errorSummary($eventDateForm); ?> <div class="row"> <label>Укажите временной интервал</label> <label> С <?php print $form->textField($eventDateForm, 'eventPeriodBegin', array('value' => date("dmY"), 'class' => 'span1')); ?> По <?php print $form->textField($eventDateForm, 'eventPeriodEnd', array('value' => date("dmY"), 'class' => 'span1')); ?> </label> <?php print $form->checkBox($eventDateForm, 'onlyCrash', array('value' => TRUE, 'class' => 'span1'))?> <?php print $form->label($eventDateForm, 'onlyCrash'); ?> </div> <div class="row submit"> <?php echo CHtml::submitButton('Показать события на объекте'); ?> </div> <?php $this->endWidget(); ?> </div><!-- form -->
In the manual did not find.
UPDATE all widget code above