-1

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.

1 Answers1

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