Support

Account

Home Forums Backend Issues (wp-admin) Conditionally format a tab name if internal field has value Reply To: Conditionally format a tab name if internal field has value

  • https://www.advancedcustomfields.com/resources/acf-prepare_field/

    
    // add filter using field key, change to your tab field's key
    add_filter('acf/prepare_field/key=field_123456', 'custom_tab_format', 20);
    function custom_tab_format($field) {
      // see if other field has value
      if (get_field('other_field_name')) {
        $field['label'] = '<strong>'.$field['label'].'</strong>';
      }
      return $field;
    }