prompttext in dropdownlist

(Francesco Salerno) #1

finally it was available in prado as a property of the object. I haven't found it in yii.

which is your solution?

(Qiang Xue) #2

Please check CHtml::listOptions

(Blake) #3

This is how you do it:

<div class="simple">

<?php echo CHtml::activeLabel($artist,'artistType'); ?>

<?php echo CHtml::activeDropDownList($artist,'artistType',array("item1","item2"),array("prompt"=>"pants")) ?>


But there’s a slight bug with it. I have created a ticket here.