Tablebuilder filter search multiple fields
Created 5 years ago by dwainsHi, I have a stream with some fields and a tablebuilder. Inside that tablebuilder I have this filter:
protected $filters = [
'search' => [
'fields' => [
'first_name',
'last_name',
'company_name',
'primary_city',
'email',
'primary_zip_code',
'primary_street',
],
When I now put inside Firstname lastname
it doesnt find the entry because its search that value inside each field. Is there a easy way to fix this to strip spaces and search entered word in each field?
Just posted a video around the manipulating values like this: https://pyrocms.com/videos/series/extending-pyrocms/overriding-streams-module-entry-tables-joining-and-filtering
You'll need to concat somehow though whether in query or in your data using an observer and hidden field.