Support

Account

Home Forums ACF PRO Connect option page to field group via PHP Reply To: Connect option page to field group via PHP

  • You need to do this with PHP. There is an undocumented filter

    
    add_filter('acf/validate_field_group', 'special_location_rules', 20, 1);
    function special_location_rules($group) {
      if ($group['key'] != 'YOUR FIELD GROUP KEY HERE') {
        return;
      }
      // set conditional logic
      return $group;
    }
    

    Create a field group with several rule groups (ORs) and export it so that you can see how $group['conditional_logic'] is organized. It is a nested array that holds the AND/OR logic.