K
K
Konstantin Spirin2020-10-30 11:35:32
Yii
Konstantin Spirin, 2020-10-30 11:35:32

How to make subcategories in yii2 select menu widget?

using select2 widget:

echo $form->field($model, 'date')
->widget(kartik\select2\Select2::className(), 
['data' => \yii\helpers\ArrayHelper::map(\frontend\models\Data::find()->All(), 'date', 'date')]);

5f9bcf7a97883307486269.png
how to make popup subcategories:
5f9bd0087b81b890629354.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question