Radio Button

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



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


You have to set

 $model->gender = 0 

in your controller.