Skip Navigation

[Resolved] Conditional form labels are showing

This support ticket is created 6 years, 8 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 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#558653
Screen Shot 2017-08-10 at 8.58.05 AM.png

I am trying to: Hide the labels when using conditionals

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

I expected to see: Hidden labels until option is selected

Instead, I got: Labels showing

#558708

Hi, you can accomplish this with a cred_show_group conditional wrapped around the input and label. In your CRED form editor, use the mouse to select the elements you want to hide. Then click the Add Generic Fields button and choose "Conditional Group". Set your conditional criteria using the wizard, or write your conditions manually.

More information about CRED conditionals:
https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/

Let me know if you have any additional questions about this.

#559210
Screen Shot 2017-08-12 at 1.14.48 PM.png

Yes, that seemed to do the trick. The only other issue, related to the conditional, is in the Filter area in the archives template, it doesn't seem to allow me to use conditionals in the filter. For example, in the screenshot, if the user selects Office, I would like to then show the office filters, rather than have them always show. I added the conditional, but it didn't seem to work.

Thanks!

#559342

Yes that's correct, the conditional group code only works in a CRED form. In a View, there's no simple way to control the display of some filters or filter groups based on the selection in others. Setting this type of functionality up would require custom code. The closest thing we offer is the ability to only show the available filters, based on the User's current selections.

For example, let's say your user selects "Type of Location: Meeting / Event Space". At this point the results will update and the other filters will update as well. If no results are found for Meeting / Event Spaces with Direct Leases, the Direct Lease filter will not be shown, and so on for other filter options.

We have some information about this here:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

You can also see this in action on our Real Estate demo site's main search form. The State and City inputs use this type of setup. You can access those demos over at discover-wp.com, and take a look at how they are set up in the back-end.

Let me know if you have questions about this and I'll be glad to take another look.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.