我有这样的dropdown选择Yii
<?php echo $form->dropdownList($students,'student_name', CHtml::listData(Students::model()->findAll(), 'student_name', 'student_name'), array('selected'=>'Choose One')); ?>
这html output是这样的
<select selected="selected" name="Students[student_name]" id="Students_student_name">
<option value="Alex">Alex</option>
<option value="John">John</option>
<option value="Johny">Johny</option>
<option value="" selected="selected"></option>
</select>
但我希望Select One应该是default selected value for the dropdown options. 所以默认情况下会Select One在没有选择任何选项时出现。
[更新]
Select One当我尝试时array('prompt'=>'Choose One'),它也是一种选择array('empty'=>'Choose One')。