Skip Navigation

[Resolved] Show text summary of chosen filters

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

Problem: I would like to show a text summary of chosen filters just before my View's results.

Solution: This will require custom code. You can add custom JavaScript in the Search and Paginations JS editor panel.

This support ticket is created 6 years, 6 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 2 replies, has 2 voices.

Last updated by marcialB 6 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#911478

Hi there

Tell us what you are trying to do? I would like to show the elements someone has checked in a filter above the search results.

Is there any documentation that you are following? No

Is there a similar example that we can see? Here you can see, that the chosen elements are listed below the filter area: hidden link

What is the link to your site? hidden link we would like to repeat the chosen elements near the text where we show, how many results were found.

Thanks for your help.

Best,
Marcial

#911590

Hi, this type of filter summary would require custom code because we do not offer a built-in way to repeat the selected form fields. We do offer the ability to insert your own JavaScript functions that can be called when custom search parameters are changed. Edit this View and scroll to the Search and Pagination editor, then in the JS panel beneath the editor you will find a "Frontend Events" button. Click this button to insert an event hook that can be triggered when search results are updated. You can add any custom JavaScript here, including jQuery, to copy the selected filters and create a summary display somewhere else on the page.

#911929

Hi Christian

Thanks for your explanation. I'm not very good with JavaScript but I will give it a shot 🙂

Best,
Marcial