ACF - Conditions - not working for Checkbox

I’m trying to conditionally show/hide fields depending on which checkbox is checked (created on ACF).

The logic is this:
String
Online IN {{dc:acf:post_field field=“course_mode”}}

but it doesn’t seem to work.

But if use the same logic in radio buttons, it does work. The issue seems to be just for checkbox field.

Please help. Thank you

Hey @bobbyninetoes,

Thanks for reaching out!

I tried the condition on my end and it is working fine.

If it doesn’t work on your end, please make sure to update the theme to the latest version.

Hope that helps.

Hi, we always update the theme whenever an update is released. Are you sure you are using ACF Pro Checkbox field? Do you mind checking for us?

Hey @bobbyninetoes,

Yes, I am using the ACF Pro checkbox field. That being said, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password
  • Page URL in question or layout name

You can find the Secure Note button at the bottom of your posts.

Thank you.

Ok - please check the ‘course_mode’ ACF field

Hey @bobbyninetoes,

The issue has something to do with your checkbox return value. Currently, it is set to both(Array), and changing it to Value will do the trick.

Hope that helps.

Thank you for replying - unfortunately I need to keep the Return Value as ‘Both’ because we’re using both the Label and Value in some of our custom plugins.

Is there any other solution?

Hello @bobbyninetoes,

In which course it did not work? When I check this out one out, I can see that it works as expected:
one_session_onsite IN {{dc:acf:post_field field="onsite_course_session_type"}}

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.