Skip Navigation

[Resolved] Never display “no results” with checkbox filters

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create a View that does not allow Users to select filters that will return no results. If I add a checkboxes field to my filters and select "Only show available inputs" in advanced search settings, checkboxes are not updated like other input types. Users are able to select checkboxes that return "No results found"

Solution: Our developers have released a patch for this known issue, and will implement the permanent fix in a future release.

Relevant Documentation: https://toolset.com/errata/checkboxes-are-not-working-like-multi-select-when-only-show-available-inputs-is-selected-in-the-advanced-search-settings/

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 17 replies, has 2 voices.

Last updated by Ido Angel 7 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#575880

it's the recipes view (first one)
and it's here:

hidden link

cheers!

#575895
Screen Shot 2017-10-03 at 6.57.00 PM.png

This special style appears to be added by your theme using the jQuery Uniform plugin. The extra formatting is applied when the page first loads, but then when the form updates the filters are regenerated. The special style does not get reapplied at that point. You can trigger a refresh of the filter styles with some JavaScript. Edit your View, and in the "Filter Editor" section toggle the JS editor panel open. Add the following code:

jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
	jQuery('.js-wpv-filter-form[data-viewid=1531] input[type=checkbox]').uniform();
});

Screenshot attached. You'll have to add this code to any AJAX-enabled Views with search form checkboxes. Replace '1531' with the View's numeric ID. If you have other AJAX form input styling issues, please open a separate ticket so we can investigate the best approach for updating all the filters at the same time.

#575901

works, thx! your the best.