ActiveDropdownList problem with options

Hello everybody, i have problem with ActiveDropdownlist, i can not add more than one option

example:




 <?php

echo Html::activeDropDownList($a, 'id', ArrayHelper::map(Lingue::find()->all(), 'id', 'nome'),

[ "multiple"=>"multiple", 'prompt'=>'Seleziona una o più lingue',"id"=>"multilingue", "class"=>"btn btn-neutral"] 

) 

?>



for every position "multiple" is in array, have not problem, but for "prompt", "id" and "class" there is problem.

example Not working class or id




 <?php

echo Html::activeDropDownList($a, 'id', ArrayHelper::map(Lingue::find()->all(), 'id', 'nome'),

[ "class"=>"btn btn-neutral","id"=>"multilingue"] 

	 		) 

?>



example working class




 <?php

echo Html::activeDropDownList($a, 'id', ArrayHelper::map(Lingue::find()->all(), 'id', 'nome'),

[ "class"=>"btn btn-neutral"] 

	 		) 

?>



which is the problem?

"multiple" refers to the HTML select attribute "multiple" which just allows for a user to select more than one attribute.




<?= Html::activeDropDownList($a, 'id', ArrayHelper::map(Lingue::find()->all(), 'id', 'nome'),["multiple"=>"multiple", 'prompt'=>'Seleziona una o più lingue',"id"=>"multilingue", "class"=>"btn btn-neutral"]);?>



is correct.

Is your query returning all of the expected results?

Add the following to a page and see.


<pre>

<?php print_r(Lingue::find()->all());?>

</pre>

Thanks for answer, yes my query return all and the select are full.

the select have corret id, class and multiple, but the button group have not

stil have problem :(

maybe i have some problem in form?