I am new to frame work. I need to populate the value in dropdownlist.
I used the following code to display the values in dropdown
echo $form->dropDownList($model,'pagetype', $Page_Type); ?>
It displays the options in the dropdown.
I want to populate the selected value in the dropdown list.
The saved values are in $savedValues array.
I dont know how to apply the selected option in the dropdownlist.
$savedValuesarray? Do you need to select a value from the dropdown or you want to add other options besides the ones defined in$Page_Type? If you need to mark the selected option, @DCoder answer is absolutely right.$model->pagetypeto the selected value (stored in the database), and it will be automatically selected from the list