Editor Select2 Multiple Column term
Editor Select2 Multiple Column term
Hi Allan,
Is it possible to search more than 1 MySQL column using editor select2?
I have item_code
and item_name
field
User can type on select2 field using item_code or item_name, and the value will stored as item_code
Example:
item_code: BNRO8010
item_name: MAGAZINE
user can type BNR (item_code) or MAG (item_name), to search that item
So far, i'm using this code to populate only item_name
...
Field::inst( 'tr_receiving_detail.item_code' )
->validator( 'Validate::notEmpty' )
->options( 'master_item', 'item_code', 'item_name' ),
Field::inst( 'master_item.item_name' ),
...
->leftJoin( 'master_item', 'master_item.item_code', '=', 'tr_receiving_detail.item_code' )
concat maybe? Please advise, thank you
Danny
This question has an accepted answers - jump to answer
Answers
I'm using view to concat, then change the options table to view
It works for me