Hello,
There is a way to use tags based in array values non using DB?
Thank you!
Hi,
Yes, instead of following lines:
$str = $g->get_dropdown_values("select distinct client_id as k, name as v from clients");
$col["editoptions"] = array("value"=>$str);
You can hardcode or fill $str with array. The format of $str is key:val; key:val; key:val …..
e.g.
$col["editoptions"] = array("value"=>'10:$10;20:$20;30:$30;40:$40;50:$50');
Ok Abu…
Thank you,
However I was trying to insert using example Select2 Tag, but give me this issue:
Couldn't execute query. Field 'client_id' doesn't have a default value – INSERT INTO invheader (`ship_via`,`invdate`,`amount`,`note`) VALUES ('5','2017-04-12','6676767','fgfg')
There is a way to resolve it?
Thank you!
The demo was intended to show multiple tag selection.
The selected values will be posted as comma sep value.
It may have insertion issue. I'll review and update the demo code.