Skip Navigation

[Closed] How to if a certain value in checkboxes field is set?

This support ticket is created 3 years, 3 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 3 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2162813
image 2.jpg
Image 1.jpg

I have a group of custom fields and use the field "checkboxes" to store some maintenance data. See. image 1.

And then I need to output different content if the first checkbox is checked and if the second is; also a mix is possible.

But my conditional statement that I use in a "fields and text" block in a view that I define, does only works if the OR the other checkbox was checked, not when both are.

Any idea how to achieve this? Would help a lot!

Kind regards!

#2162893

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Thank you for getting in touch.

Ok so the issue here is that the checkboxes do not function well in our conditional statements as such custom code is required to perform the conditional on the checkboxes.

Have a look at the link below as it should be able to help you write conditionals with the checkboxes.
https://toolset.com/forums/topic/how-to-use-conditional-output-with-checkboxes/#post-1469649

Please let me know if this helps.
Thanks,
Shane

#2162905

Hi,
I just copied the function and activated it – and I used the shortcode, but it does not work properly. Maybe in the given example some ' or " are missing or are not in the right place?

#2162945

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Would it be possible to provide me with admin access to the website so that I can have a look to see whats happening?

I've enabled the private fields for you to send me the credentials.

Also please let me know the page where you are testing this out.

Thanks,
Shane

The topic ‘[Closed] How to if a certain value in checkboxes field is set?’ is closed to new replies.