Skip Navigation

[Resolved] How to use conditional output with checkboxes – Part 2

This support ticket is created 4 years, 9 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by kirillS-3 4 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1574895

Just in continue to previous closed topic:
https://toolset.com/forums/topic/how-to-use-conditional-output-with-checkboxes/

That code doesn't work. It still shows only one of two selected multiple checkbox options. And then I put other toolset shortcodes like [types field=...] inside [checkboxes_conditional][/checkboxes_conditional] it doesn't work at all.
Still need your help to show content based on multiple selection of multiple checkbox field.

#1575651

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Unless I've misunderstood what you are trying to do, then it seems to me that you need to be able to check whether individual checkboxes options are checked (regardless of whether multiple options have been checked), and that is covered in our documentation here: https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#checking-types-checkboxes-field-for-non-empty-value

(Not the first part, about checking if *any* checkbox is checked, but the second part about checking individual checkboxes.)

Is that your use case?

In which case, no need for custom code.

#1582943

Thanks Nigel, this is works.
It was not clear that it should be exact option in conditional compare with value. And your colleague from previous request didn't know it.