Generate Drop-Down List For Enum Using Gii Crud Generator

I am new to yii…

I used gii for generating model and crud for my table…

but for ENUM data type there is text field in form not drop-down.

I want drop-down for ENUM. Please help me.

You can use Yii::app()->params[] to display the field as dropdown.

Ex: CHtml::dropdownlist($model, ‘field’, Yii::app()->params[]);

CHtml::dropdownlist($model, ‘field’, array(‘enum1’=>'Enum 1, ‘enum2’=>‘Enum 2’));

I don’t know if you can query the datebase and create that array dinamicaly.

Thanks but i want to do it dynamically using CRUD generator.

CRUD generator directly fetch that field is ENUM and generate drop-down for it at the time of form generation.

Thanks but i want to do it dynamically using CRUD generator.

CRUD generator directly fetch that field is ENUM and generate drop-down for it at the time of form generation.

How to do manually that I knew.

Help me for do it dynamically please…

thank you all…finally done from superb link