Support

Account

Home Forums General Issues Disable Entire Field Group via Another ACF Field (in Separate Group) Reply To: Disable Entire Field Group via Another ACF Field (in Separate Group)

  • You could build custom location rules based on all of the possible fields.

    I would not go that far.

    For something like this I would create an acf/load_field_group filter. This is an undocumented filter hook but there is a small example that can be found here.

    In this filter I would modify the location rules for each group and add custom location rules that way.

    Then build just the “rule match” function for each of my custom fields. This can be done with just the "acf/location/rule_match/{$rule}" filter without building an entire class for each of your custom location rules. Examples of this can be found some of my examples here https://github.com/Hube2/acf-filters-and-functions