Problem: I have a checkboxes group custom field and I would like to display a different field if one of the checkboxes is checked. I tried nesting one Types field shortcode inside another one, but it produces inaccurate results.
Solution:
Use conditional HTML to test that checkboxes field group's selected values against a known array:
[wpv-conditional if="(CONTAINS(ARRAY([types field='pdb-areas' output='raw'][/types]),'some-value'))"] <tr> <td width="321"><strong><em>Markedsføring:</em> [types field="company-name-short"][/types]'s Facebook side</strong></td> <td width="321">[types field="company-name-short"][/types] har oprettet en side på Facebook for markedsføring og for skabe et online fælleskab omkring [types field="company-name-short"][/types].</td> </tr> [/wpv-conditional]
Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
https://toolset.com/documentation/user-guides/cred-conditional-display-engine/
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 4 replies, has 2 voices.
Last updated by 5 years, 2 months ago.
Assisted by: Christian Cox.