Skip to content

Instantly share code, notes, and snippets.

@mdmunir
Created March 15, 2017 03:50
Show Gist options
  • Select an option

  • Save mdmunir/f8e79f81909a8eba2ead96ca9b12c54c to your computer and use it in GitHub Desktop.

Select an option

Save mdmunir/f8e79f81909a8eba2ead96ca9b12c54c to your computer and use it in GitHub Desktop.
<?=
GridInput::widget([
'allModels' => $model->orderItems,
'model' => \app\models\OrderItem::className(),
'form' => $form,
'columns' => [
['class' => 'mdm\widgets\SerialColumn'],
[
'attribute' => 'name',
'widget' => ['kartik\select2\Select2', [
// option widget here
]]
],
['class' => 'mdm\widgets\ButtonColumn']
],
'hiddens'=>[
'id'
]
])
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment