Commit af5297fe authored by Shakarim Sapa's avatar Shakarim Sapa

- Add the options

parent 8ce45d7f
......@@ -39,15 +39,21 @@ use common\modules\content\widgets\MetaTagsWidget;
} ?>
<?php
$items = MessageTemplate::find()->all();
$options = [];
foreach($items as $item) {
$options[$item->id] = ['data-tokens' => $item->name];
}
echo $form
->field($model, 'template_id')
->dropDownList(
\yii\helpers\ArrayHelper::map(MessageTemplate::find()->all(), 'id', 'name'
\yii\helpers\ArrayHelper::map($items, 'id', 'name'
), [
'class' => 'form-control selectpicker',
'data-live-search' => 'true',
'data-size' => 10,
'data-style' => 'btn-white'
'data-style' => 'btn-white',
'options' => $options
]); ?>
<?= $form->field($model, 'file')->fileInput() ?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment