Home › Toolset Professional Support › [Resolved] Hide Content When Reset Button is Clicked
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)
Tagged: Custom search, Views plugin
Related documentation:
This topic contains 1 reply, has 2 voices.
Last updated by Christian Cox 5 years, 6 months ago.
Assisted by: Christian Cox.
Tell us what you are trying to do?
My Custom Search form works well, but, when I click the reset button, it shows all the properties. I need it to hide the content when the form is reset.
Is there any documentation that you are following?
These are the jquery events I currently have running.
// hide results on page load
jQuery('.js-wpv-view-layout-1897').hide();
// show results when the search button is clicked
jQuery('.wpv-submit-trigger').click(function() {
jQuery('.js-wpv-view-layout-1897').show();
});
jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
if(jQuery('#searchMore').find('input[type="checkbox"]:checked').length > 0) {
jQuery('#searchMore').addClass("in");
}
});
Is there a similar example that we can see?
Couldn't find one
What is the link to your site?
hidden link
Hi, unfortunately there's no public event for the reset button. Responding to those clicks will require code that falls outside the scope of our support forums. A supported solution to require some filter selection before showing results is explained in other posts on the site, using the PHP API:
https://toolset.com/forums/topic/displaying-posts-according-to-their-parent-posts/
https://toolset.com/forums/topic/making-the-filter-drop-downs-required/
https://toolset.com/forums/topic/troubleshoot-wpv_filter_query-in-functions-php/
The solution depends on the filters that are added to your custom search, and the possible options for each filter. Let me know if you'd like assistance setting that up.