[Resolved] Conditional statement based on Checkboxes field not working as expected
This support ticket is created 4 years, 11 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I have a custom field for Services Offered, it has about 5-6 options, then an "Other" option.
In the View, I have a conditional statement (below) that checks if the Services Offered field has "Other" checked, and if so, displays a link to view more info.
The issue I am having is that if "Other" is the only option checked, the conditional code displays properly, but if they have multiple options selected and "Other" selected as well, the conditional code does not display.
Below is the Conditional Shortcode I am using and I have attached screenshots.
Where:
- Replace 'option_value' with your original option value
2)
Use the Types shortcode to check the current state of checkboxes option:
For example:
[types field="services-offered" option="0" state="checked"]
text to display when option 0 is checked
[/types]
[types field="services-offered" option="0" state="unchecked"]
text to display when option 0 is not checked.
[/types]