Cannot get radio field value.

I must be doing something stupid, but I cannot get the value of selected radio button in my controller class.

This is in my view:




<?=$form->field($model, 'dellogo')->radioList(['yes' => 'Yes', 'no' => 'No'], ['itemOptions' => ['class' =>'radio-inline']])?>



This is in my controller:




if($model->dellogo == "yes")

{

   ......

}



Thanks

Try


var_dump($model->dellogo);exit;

and see what you are getting?

I am getting: null

I defined "dellogo" in my model as:




public $dellogo;



NEVER MIND.

I was reading the wrong model :)

Admin please delete this topic if you wish…