Support

Account

Populate choices to conditional logic

Hi !
I have a question about populating choices in the admin part of ACF.
For now I know how to populate choices to selection fields with acf/load_field.
I got an options page in which I want my users make some choices and I want these choices affect the way fields are displayed or not in another group.
So here is my question : is there a way to populate these choices in order to activate conditional logic in another group ?

The best advice I can give you is to create a field group that has a select field with some example choices and some other fields that are conditional on those choices an then export that group to PHP to see what the settings are.

This cannot be done across field groups in the ACF admin, but it can be done with the acf/load_field filter because the conditional login is based on the field key. Your conditional logic will work as long as that field key is on the page. However, you must make sure it’s on the page because otherwise you might trigger some JS errors if ACF tries to find a field that does not exist.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.