Searching multiple values using checkbox filters
Searching multiple values using checkbox filters

How do I search multiple values using checkbox filters?
I have some hidden columns with data and I need to assign multiple values to some of them that would then come if the search was filtered.
For example:
Region is a search filter and I have some checkboxes that the user can filter by, I want to assign more than one value per column or <td>
that can then be searched.
Here is a fiddle with what I am trying to achieve
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @neelam_cite ,
It looks close. You need to change this section of the code here:
If you use
split()
to breakdownsearchData[5]
on a comma, and just iterate through them to see if any are in your region array.Hope that helps,
Colin
Hi @colin
I'm not sure I understand how to do that?
Hi @neelam_cite ,
See here. You just need to
split()
the regions:Cheers,
Colin
p.s. I'm old school, I like
for()
loops, you might want to change that to beevery()
Thanks @colin that really helped, I have some values like: Yorkshire and Humber but they don't seem to be picked up when the checkbox is clicked, does the regex need to be updated?
Hi @neelam_cite ,
In that example I posed last, "Sarah Smith" from "Yorkshire and Humber" is being picked out - she's the only one from there in that dataset. Could you give instructions, please, with that example on how to reproduce the problem you're seeing.
Cheers,
Colin
Hi @colin ,
Please ignore me, you are correct it does work. I have accepted your answer as the correct one.
Thank you for all your help!