0
我想在YII2中創建一個銷售點,所以我需要在銷售頁面中創建一個select2項目搜索,我需要它在表格項目之間搜索,Bar_code因爲我在兩個表格中進行了搜索有項目比1 Bar_codeYii2:Dropdownlist
我知道選擇2作品及其作品與我怎麼罰款上表
<?= $form->field($model, 'item_id')->widget(select2::className(),[
'data'=> arrayhelper::map(items::find()->all(),'item_id','item_name'),
'options'=>['placeholder'=>'Enter item name or scan barcode'],
'pluginOptions'=>[
'allowClear'=>true
],
])?>`
但在拖它的複雜,還是有其他辦法做到這一點嗎?