I am new to yii.I want to create model and form using Gii,In my database table i used enum data type for specific values to select by user.than i generate model and crude using Gii but it doesn't create drop-down list in form for that enum field.To create that drop-down using Gii what should i have to do. or change templates of Gii. please help me. Thanks in advance.
Asked
Active
Viewed 1,056 times
1 Answers
0
change the _form
and put your dropdown after creation by gii
echo $form->dropdownList($model , 'fieldName' , array(
'private' => Yii::T('model' , 'private'), // give data as an array to populate your drop down
'public' => Yii::T('model' , 'public'),
))

Developerium
- 7,155
- 5
- 36
- 56
-
yii generates your _form.. You have to then edit it to meet your specific needs – neophyte Jul 17 '14 at 12:01