Support

Account

Home Forums Feature Requests Conditional Logic across Field Groups

Solving

Conditional Logic across Field Groups

  • Hello,

    i really would love to see some more capabilities to work with conditional logic, maybe even in relation to location rules .?

    Let’s say you have one select field on the side section of your edit screen that handles all the other fields of the ‘normal’ section. That would behave quite similar to the post format feature or the page template select.

    I’ve already thought about different approaches to realize this behaviour, but these are still just ideas ‘in progress’. Maybe it could be enough to mark a conditional field (select, radio, checkbox) somewhere as global accessible and the condition would then appears in every field group with the same location rule.
    Or even more powerful: a global marked condition can be set as location rule…

    Like you see, i found just quite basic approaches and rather don’t know whether it’s really a good idea to have global conditions. what do you think about?

  • Hi @highkat

    Thanks for the feature request. I’m not sure how I would build this into the core without bloating the interface.

    That said, this global conditional logic would be pretty awesome!

    I’ll come back to this in the future.
    For now, you might need to consider writing some custom JS to hide / show field groups.

    Thanks
    E

  • Hi,
    I come across same issue as @highkat. I found http://www.elliotcondon.com/conditional-logic-for-advanced-custom-fields/ really helpful. In order to make it work with most recent version of ACF you’ll have to use acf/input/admin_footer hook instead of acf_head-input described in the article and use acf.add_action('ready', function() { instead of $(document).on('acf/setup_fields'... (see: https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/)

    I know that this is an old question but I think that it might be useful for someone.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Conditional Logic across Field Groups’ is closed to new replies.