yii - Yii2.0/Rules for dropdownlist -


i've following dropdownlist:

<?= $form->field($model, 'urlaubsziel')->dropdownlist([     1 => 'usa',      2 => 'mexico',     3 => 'deutschland',      4 => 'england',     5 => 'frankreich',],['prompt'=>'select country']);?> 

how define rule content of choice in public function rules(){}? ['urlaubsziel','string'] give me number,not content

update code below.

 <?= $form->field($model, 'urlaubsziel')->dropdownlist([     'usa' => 'usa',      'mexico' => 'mexico',     'deutschland' => 'deutschland',      'england' => 'england',      'frankreich' => 'frankreich',],['prompt'=>'select     country']);?> 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -