Trying to add conditional logic to a True / False field that will allow the user to make additional selections based on their True / False selection. However, all I’m getting is “No toggle fields available” and it’s the same for T/F, radio, checkboxes, etc… Everything that seems like it should have toggle fields available for conditional logic (based on what I’ve read elsewhere). Is there something simple I’m missing?
It doesn’t work that way, but let’s pretend it did. I have a Boolean (True / False) field called “Show Me” that says if “Show Me” is True, show the field. This means that if “Show Me” is ever switched to False, then it would get hidden… forever (until you dug unto the database, but that’s neither here nor there).
The Conditional Logic for each field is for showing or hiding THIS field based on input from other fields.
In a more real world example, I create a few different fields. One called “Background Color”. One called “Background Image”. And one called “Background Video”. Above those three a create a radio button field that is called “Background Type” with the options of color, image, and video. I then add conditional logic to the “Background Color” field that says if “Background Type” is equal to color, show this field. Then I do the same for the other two background fields. You are now hiding unnecessary fields in your editor UI.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.