Is it possible to create a DropDownListRow on a form that has no $model parameter? I want to have users select from a list of controller Actions using a DropDownListRow (the YiiBooster variant of DropDownList). I'm just working with a list of Actions from the Controller, so I don't need a $model in the widget parameters.
The problem is that Yii won't create a form unless there is a $model associated with it. I want the user to select the controller Action, and then have the associated subform open based on the Action the user choose.
addition to @ramamoorthy_villi answer
to create a dropdown list, simply use CHtml s dropdownList() function, then you can have your dropdown filled with your own data,
$data = array(
'selected_value' => 'defaultController/action',
'2' => 'controller2/action',
'3' => 'controller3/action',
)
echo CHtml::dropdownList('Name' , 'selected_value' , $data);
now you have it with defaultController/action
pre selected