docc
(Paulusmikkola)
1
i have CForm like this
<?php
return array(
'title' => Yii::t('Personal', 'Please provide your personal information.'),
'elements' => array(
'cvid' => array(
'type' => 'hidden',
),
'appID' => array(
'type' => 'hidden',
),
'firstName' => array(
'type' => 'text',
),
'surName' => array(
'type' => 'text',
),
'address' => array(
'type' => 'text',
),
'postalCode' => array(
'type' => 'text',
),
'city' => array(
'type' => 'text',
),
'phone' => array(
'type' => 'text',
),
'email' => array(
'type' => 'text',
),
'gender' => array(
'type' => 'radiolist',
//'options' => array(
//'name' => 'gender',
'options'=>array(
'type'=>'radio', //'value'=> 'male',
//'value'=>'female',
),
And I cant figure out how could I get radio button for gender?
whoopass
(Kyleferreira111)
2
I can’t find any reference to a radio button through CForm for versions 1.1.x only through CActiveForm
http://www.yiiframework.com/doc/api/CActiveForm#radioButton-detail
docc
(Paulusmikkola)
3
Actually i found it my self, its like this
'gender' => array(
'type' => 'radiolist',
'items'=> array(
'0' =>'male', '1'=>'female',
),
),