There is a way to use tags based in array values non using DB?
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 …..
$col["editoptions"] = array("value"=>'10:$10;20:$20;30:$30;40:$40;50:$50');
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?
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.
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!