Answer the question
In order to leave comments, you need to log in
How to add a drop down list?
There is a drop down list
<?= $form->field($catSerial, 'id_cat')->dropDownList($cat,['prompt' => 'Выбирите категорию']); ?>
Answer the question
In order to leave comments, you need to log in
Install the Select2 widget from kartik-v.
It allows multiple selections in a drop down list.
And in addition, a public property must be added to the model in order to process the preservation of the many-to-many relationship.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question