Skip to content

Instantly share code, notes, and snippets.

@DrMabuse23
Created June 13, 2014 13:47
Show Gist options
  • Save DrMabuse23/5719cda45ee56e69b85f to your computer and use it in GitHub Desktop.
Save DrMabuse23/5719cda45ee56e69b85f to your computer and use it in GitHub Desktop.
<?= $form->field($model, 'category_id')->widget(\kartik\widgets\Select2::classname(), [
'options' => ['placeholder' => Yii::t('app','Choose')],
'data' => \yii\helpers\ArrayHelper::map(\common\models\Category::find()->all(),'id','title')
]);?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment