in booster widget tbActiveform, i will add select2group widget, with multiple selected, so i use "tags" attribute,
<div class="row">
<?= $form->select2Group($model,'zat_aktif',[
'wrapperHtmlOptions'=>[
'class'=>'col-sm-5',
],
'widgetOptions'=>[
'asDropDownList' => false,
'options'=>[
'placeholder'=>'Select Metode',
'tokenSeparators' => [',', ' '],
// 'tags' => array('clever', 'is', 'better', 'clevertech'),
// ],
'data'=>CHtml::listData(Detailbahan::model()->findAll(),'nama_detail_bhn', 'nama_detail_bhn'),
],
]) ?></div>
How can i get tags value from model/database??? thank you
alejox
(Alejox21 12)
2
try this:
‘widgetOptions’ => array(
'data'=>CHtml::listData(Model::model()->findAll(),'idtosave','nametoshow'),
and comment or delete ‘asDropDownList’ => false,