Radio Button

hi i have a attribute "int gender;" in model and and i have this code in _form.php(view)


 $form->radioButtonList($model,'gender',array(1=>'male',0=>'female'),array('labelOptions'=>array('style'=>'display:inline')));

.

but the gender value is not set while saving oly default 0 is set in database can u tell me how to solve it thanks in advance

in your controller action echo radio value to ensure that value is passing correctly ,

i think its ok with form but some problem with saving value to db

thanks i got the bug out thank you so much

hi,

You have to set


 $model->gender = 0 

in your controller.