YII, form simple drop down <?php echo $form->dropDownList($model, 'sex', array('1' => 'male', '2' => 'female'), array('empty' => 'Select one of the following...') ); ?>
yii, form, create drop down and populate it with values from any model : Use code below in the view file inside the form: <? php echo $form -> dropDownList ( $model , 'item_type_id' , CHtml :: listData ( ItemType :: model ()-> findAll (), 'id' , 'type' ), array ( 'empty' => 'select Type' )); ?>