php - Yii DropdownList prompt -


i have dropdownlist, doesnt take prompt or empty default value, takes last value of $list, why can be?

        $models = zfinfraestructuras::model()->findall(array('order' => 'infraestructura_nombre'));         $list = chtml::listdata($models,                  'infraestructura_id', 'infraestructura_nombre');          echo chtml::dropdownlist('infraestructuras', $models,                $list,               array('prompt' => 'selecciona infraestructura'));     ?> </div> 

public static string dropdownlist(string $name, string $select, array $data, array $htmloptions=array ( )) 

check select parameter

http://yiiapi.com/chtml#dropdownlist-detail


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -