echo $form->field($model, 'parentid', ['showLabels'=>true])
->widget(Select2::classname(), [
'data'=>Addevicearea::getAllArea(),
'pluginOptions'=>['allowClear'=>true],
'options' => ['placeholder'=>'请选择']
]);
echo $form->field($model, 'parentid', ['showLabels'=>true])
->widget(Select2::classname(), [
'data'=>Addevicearea::getAllArea(),
'pluginOptions'=>['allowClear'=>true],
'options' => ['placeholder'=>'请选择']
]);
本文标题:ActiveForm中如何添加select2插件
本文链接:https://www.haomeiwen.com/subject/qnrlzxtx.html
网友评论