Skip Navigation

[Resolved] Conditional display of select filter in custom search

This support ticket is created 5 years, 10 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 justinB-3 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1221745

I am trying to: Implement conditional display of select filter in custom search so that if Body is set to Aerial it will show the Model dropdown else if Wildland/Bush Truck is selected it show the Wildland Model dropdown

Link to a page where the issue can be seen: hidden link

I expected to see: If Body is set to Aerial it will show the Model dropdown else if Wildland/Bush Truck is selected it show the Wildland Model dropdown

Instead, I got: Both Model and Wildland Model dropdown showing regardless of what I chose for Body

#1221808

In general it is not possible to control which search filters appear depending on other filter selections. We do offer the option to "Limit Filter Inputs According to Available Results", which is described in more detail here: https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/#dependent-parametric-search
Basically in this setup certain input fields will be hidden if they would produce no results. This option does have some performance drawbacks on larger sites with a large number of custom fields.

#1245167

My issue is resolved now. Thank you!