Hi everyone,
I am joining a project working with ACF Pro, and a lot of custom fields have been designed with the UI interface. They are then used in PHP, in a custom template.
I am adding some components to the project, and I need to add some conditional logic rules to existing fields, but I don’t really want to do it with UI. I think it’s easier to maintain if everything goes in the code.
Any idea on how I can manage it ?
Thanks !
If the field are added with the UI then this is usually the place to add conditional logic.
Conditional logic can be altered in PHP by using an acf/prepare_field filter.
The best way to see how the conditional logic argument is constructed it to create some fields with conditional logic and export them to PHP.