• Resolved Mark Irish

    (@markdirish)


    I have a custom post type with about 20 custom fields. For ease of the user, these fields are grouped together using the ACF Group type. However, using the Group type (and having nested fields inside) seems to confuse Advanced Forms Pro, and a lot of functionality ceases to work.

    For example, when editing a form with “Form Settings->Editing->Custom fields to map”, only the Group is shown, and not the fields that are contained within. This means you can only map entire groups, not have the granularity of each field.

    Similarly, I wanted to exclude fields on a front-end form. I followed the instructions here: https://hookturn.io/exclude-fields-in-acf-front-end-forms/ . But again, I can only exclude groups: If I try to add shortcode to exclude anything inside of a group, it doesn’t work. Similarly, I tried to use a filter to programatically do it. I have a group called “company_application”, and inside a Yes/No toggle called “nda_signed”:

    add_filter( 'af/form/args/key=form_XXXXXXXX', function ( $args, $form ) {
    
      $args['exclude_fields'] = [
        'nda_signed',
        'company_application_nda_signed',
        'field_63b70c1a19f6e'
      ];
    
      return $args;
    }, 10, 2 );

    None of the above hide/exclude the “nda_signed” field on the front end. Using this same function, I can hide fields outside of Groups, and also entire Groups, but not individual fields inside of Groups.

    Am I missing something, or this a bug/missing feature in Advanced Forms Pro?

    Thank you

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘ACF Group Fields seem to confuse Advanced Forms Pro’ is closed to new replies.