php - Yii radioButtonList - JUI Buttonset - Hidden input field -
i new yii.
if generate radiobuttonlist using yii form builder next code
echo $form->radiobuttonlist($person,'gender_code',array('m'=>'male','f'=>'female'));
it outputs next html
<input id="ytperson_gender_code" type="hidden" value="" name="person[gender_code]" /> <input id="person_gender_code_0" value="m" type="radio" name="person[gender_code]" /> <label for="person_gender_code_0">male</label><br/> <input id="person_gender_code_1" value="f" type="radio" name="person[gender_code]" /> <label for="person_gender_code_1">female</label>
why hidden input field generated? purpose serve.? there way can remove it?
i trying convert radio buttons jquery ui buttonset hidden input field has same name radio buttons , because of that, jquery ui buttonset breaks.
any help appreciated. thanks.
according yii documentation, can still value if radiobutton unchecked. there should htmloption tell not show. try: radiobuttonlist($person,'gender_code',array('m'=>'male','f'=>'female'),array('uncheckvalue'=>null))
php jquery-ui yii
No comments:
Post a Comment