Renders a radio button list for a model attribute.
This method is a wrapper of {@link CHtml::activeRadioButtonList}.
Please check {@link CHtml::activeRadioButtonList} for detailed information
about the parameters for this method.
public radioButtonList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string | ||
$model | CModel | the data model |
$attribute | string | the attribute |
$data | array | value-label pairs used to generate the radio button list. |
$htmlOptions | array | additional HTML options. |
return | string | the generated radio button list |
<?php echo $form->error($model, "SubjectID"); ?> <?php echo $form->dropDownListRow($model, "SpecialityID", $d, array('class' => 'span12')); ?> <?php echo $form->textFieldRow($model, "LevelID", array('class' => 'span12', "readonly" => "readonly")); ?> <?php echo $form->dropDownListRow($model, "SubjectID", CHtml::listData(Subjects::model()->findAll(), "idSubjects", "SubjectName"), array('class' => 'span12')); ?> <?php echo "Це профільний предмет?"; echo $form->radioButtonList($model, "isProfile", array(0 => "ні", 1 => "так"), array('separator' => ' ')); ?> </div> </div> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Create' : 'Save')); ?> </div> <?php $this->endWidget();