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.
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.
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.
Also, post the screenshot of the checkbox form field. Are you using "separate values"?
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.
Thanks, screenshot attached. URL is set ashttps://1of1stuff.com/search-results/?checkbox=[212 sanitize_url=1]
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.
Thanks again, see attached.
That's what I thought. Change the redirect URL to:
/search-results/?checkbox=[212 show=value sanitize_url=1] and see what happens
Make sure you notice the edited version of the comment since the one that got sent by email probably looks like a dictionary vomited.
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;
}
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.
OK, after a bit more fiddling, I got it working.
Thanks
Please login or Register to submit your answer