Answer the question
In order to leave comments, you need to log in
Is there or how to implement radiobutton ID variable for radioButtonList(yii 1)?
Hello.
Due to some nuances in the layout, it became necessary to write the ID of the radio button in the radioButtonList function in labelOptions to the for attribute. It's hard to explain, so here are some examples:
echo $form->radioButtonList($model,'gender', array('f'=>'Женщина','m'=>'Мужчина'),
array(
'separator'=>'',
'template'=>"
<div class=\"customradio\">
{input}{beginLabel}{labelTitle}<div></div>{endLabel}
</div>
",
'labelOptions'=>array('class'=>'inner', 'for'=>$magicVariableExample_gender_0),
'baseID'=>'gender',
'uncheckValue'=>null,
));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question