form dropDownList not working..

Hi, sorry for being noob. but i don’t seem to get this working

I wrote down

in the view file:


<?php echo $form->dropDownList( $model, 'type_id', $model->getTypeOptions()); ?> 



in the model file:


public function getTypeOptions() {

       return array(

       self::TYPE_BUG=>'Bug',

       self::TYPE_FEATURE=>'Feature',

       self::TYPE_TASK=>'Task',

       );

}

Can anyone see anything wrong?

Try it like this:




<?php echo $form->dropDownList( $model, 'type_id', MyModel::model()->getTypeOptions()); ?> 



I did that too, doesn’t work either.

You should probably post more code from the model, action and view. Also, what do you mean by not being able to get it working? PHP error? No list rendered? No items in the list?