Here, We need to enable “cn” in multi-select search.
$str = ”;//db query
$col[“editable”] = false;
$col[“search”] = true;
$col[“stype”] = “select-multiple”; // enable dropdown multiple search
$col[“searchoptions”] = array(“value” => $str);
$col[“searchoptions”][“sopt”] = array(“cn”);//default phpgrid search is “op”:”in”
i tried with “sopt” but still it is searching with “in”.
Multiselect expected exact values to be searched but could be multiple. Thats why we have used IN operator here.
Can you explain use case where you need contains with multi-select options?
Abu Ghufran - Dev Team
Grid 4 PHP Framework
multi-select is working in our dropdown field type which contains only one value at a time.
e.g., city = ‘Mumbai’; // IN is working for it
here, we are using multi-select for multi-checkbox field type which contains a comma separated values
e.g., education = “BCA,MCA,PhD”; // IN is not working for it so we need to enable “cn” op
I hope from this example you can understand it better
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?