Skip Navigation

[Resolved] Show/Hide Checkboxes Based on Another Checkbox Selection

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 3 replies, has 2 voices.

Last updated by Christian Cox 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1186175

We have a business directory set up at hidden link You will see that there are some checkboxes set up for "Action Areas" and for "Show businesses that have set green economy targets". Each of these are set up as Custom Field Checkboxes.

What we would like to do is match the target to the selected action area. If someone checks the "GHG" Action Area it will only show them the "GHG Target" checkbox. If someone checks the "Water" Action Area it will only show them the "Water Target" checkbox. If someone checks the "Waste" Action Area it will only show them the "Waste Target" checkbox. If someone checks the "B Lab" Action Area it will only show them the "B Lab" checkbox (though we don't have any businesses with a B Lab Target so you don't see it an an option there)

Any help with this appreciated.

#1186208

Hi, customizing search filter interaction falls mostly outside the scope of support we can provide here. There isn't a public API available for handling filter selections, but we do have a few event handlers you might find useful for crafting your own JavaScript / CSS solution. If you edit the View and scroll down to the Search and Pagination editor panel, you can toggle open a JS panel (if you can't see Search and Pagination, you can activate it in the Screen Options tab in the top right corner of the View editor screen). There is a button here you can use to insert custom JavaScript event listeners that will be triggered by pagination or search form update events. If you have a question about how to implement one of those event handlers, I will do my best to answer, but keep in mind that manipulating display or selection of filter elements based on other filter selections would be up to you and your own custom JavaScript / CSS code.

#1186216

Thanks Christian. I thought there may be a way to solve it via the conditionals through some sort of "if checked, then this" type of statement. I can pay for this sort of thing. Is there a list of Toolset and/or Javascript contractors you can point me to?

#1186218

The conditionals we have are for use in the context of a post, or to handle field display in a Toolset Form. Unfortunately they don't apply in the case of search filters. We have a portal where you can connect with independent contractors who may be able to help: https://toolset.com/contractors