Checkbox search not working correctly

By: Tom Favell | Asked: 02/23/2026
ForumsCategory: General questionsCheckbox search not working correctly
Tom Favell asked 2 weeks ago

I'm using checkboxes to search for entries that correspond to the selected checkboxes. Making one selection works, but two or more selections don't (returns - Sorry, no entries found with that selection), that is to say, I know some entries will match the criteria.

Attached screenshot of filter settings.

Attachments

3 Answers
Rob LeVineRob LeVine Staff answered 2 weeks ago

See this recent post. Also post the URL that is generated when you land on the page with your view that's showing the results.

Rob LeVineRob LeVine
Staff replied 2 weeks ago

That is hysterically bad. It contains all sorts of HTML instead of just the values. Copy and paste the redirect URL in your search form.

Rob LeVineRob LeVine
Staff replied 2 weeks ago

Also, post the screenshot of the checkbox form field. Are you using "separate values"?

Tom Favell
replied 2 weeks ago

Perhaps best if you try it yourself - no login required goto

https://1of1stuff.com/all-projects/

Rob LeVineRob LeVine
Staff replied 2 weeks ago

I already had. I would still like to see the redirect URL (from the confirmation action in the form), a screenshot of the field in the form builder, and know if you're using separate values.

Tom Favell answered 2 weeks ago

Thanks, screenshot attached. URL is set ashttps://1of1stuff.com/search-results/?checkbox=[212 sanitize_url=1]

Attachments

Rob LeVineRob LeVine
Staff replied 2 weeks ago

Screenshot of the field options. Go to the search form, click on the checkbox field and expand the left side option enough to see the header "Checkboxes Options" and some stuff below it.

Tom Favell answered 2 weeks ago

Thanks again, see attached.

Attachments

Rob LeVineRob LeVine
Staff replied 2 weeks ago

That's what I thought. Change the redirect URL to:
/search-results/?checkbox=[212 show=value sanitize_url=1] and see what happens

Rob LeVineRob LeVine
Staff replied 2 weeks ago

Make sure you notice the edited version of the comment since the one that got sent by email probably looks like a dictionary vomited.

Tom Favell
replied 2 weeks ago

Thanks Rob, but that didn't make any difference. BTW this is the code I have in my functions.php

// ADDED BY TOM - for checkbox search
add_filter('frm_filter_where_val', 'frm_search_multiple_values', 8, 2);
function frm_search_multiple_values($where, $args){
if ( $args['display']->ID == 373 and in_array( $args['where_opt'], array( 74 ) ) ) {
$where = explode(', ', $where);
}
return $where;
}

Rob LeVineRob LeVine
Staff replied 2 weeks ago

It made a difference because now the proper value(s) are getting sent to the view. I suspect the PHP code is the problem because the checkbox field id is 212, not 74.

Tom Favell
replied 2 weeks ago

OK, after a bit more fiddling, I got it working.
Thanks

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right