📜  kartik select2 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:34.330000             🧑  作者: Mango

代码示例1
$form->field($model, 'attribute')->widget(\kartik\select2\Select2::classname(), [
                'data' => \yii\helpers\ArrayHelper::map(Model::find()->all(), 'id', 'username'),
                'options' => ['placeholder' => 'Tanlang', 'multiple' => false, 'required' => true],
                'theme' => \kartik\select2\Select2::THEME_KRAJEE,
                'size' => 'xs',