Dependant Dropdown Lists When Editing


I followed the wiki on dependant drop down lists which was great. My question is when updating I’d like to show the current selected dependant dropdown option, rather than nothing.

Without breaking the create form. How do I do this?

Thanks for any help

try this…

 echo CHtml::dropDownList('designation_id', 'designation_id', CHtml::listData(VenueDesignation::model()->findAll("status='1'"),'id','designation_name'), array('options' => array($resultSet->designation_id => array('selected' => true),'class'=>'col_165')));