function register_field_groups()

in web/wp-content/plugins/acf-extended/includes/modules/form/module-form-fields.php [1139:2149]


    function register_field_groups($field_groups, $module){
    
        $layouts = array();
        $actions = acfe_get_form_action_types();
        
        foreach($actions as $action){
            
            $layout = $action->get_layout();
            $layouts[ $layout['key'] ] = $layout;
            
        }
        
        $field_groups[] = array(
            'key' => 'group_acfe_form',
            'title' => __('Form', 'acfe'),
    
            'location' => array(
                array(
                    array(
                        'param' => 'post_type',
                        'operator' => '==',
                        'value' => $module->post_type,
                    ),
                ),
            ),
    
            'menu_order' => 0,
            'position' => 'normal',
            'style' => 'default',
            'label_placement' => 'left',
            'instruction_placement' => 'label',
            'hide_on_screen' => '',
            'active' => 1,
            'description' => '',
    
            'fields' => array(
                
                /**
                 * general
                 */
                array(
                    'key' => 'field_tab_general',
                    'label' => __('General', 'acfe'),
                    'name' => '',
                    'type' => 'tab',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                        'data-no-preference' => true,
                    ),
                    'placement' => 'top',
                    'endpoint' => 0,
                ),
                array(
                    'key' => 'field_name',
                    'label' => __('Name', 'acfe'),
                    'name' => 'name',
                    'type' => 'acfe_slug',
                    'instructions' => '',
                    'required' => 1,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => '',
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'maxlength' => '',
                ),
                array(
                    'key' => 'field_field_groups',
                    'label' => __('Field Groups', 'acfe'),
                    'name' => 'field_groups',
                    'type' => 'select',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'choices' => array(),
                    'default_value' => array(),
                    'allow_null' => 1,
                    'multiple' => 1,
                    'ui' => 1,
                    'ajax' => 1,
                    'return_format' => 'value',
                    'allow_custom' => 1,
                    'placeholder' => '',
                    'ajax_action' => 'acfe/form/map_field_groups_ajax'
                ),
                array(
                    'key' => 'field_actions',
                    'label' => __('Actions', 'acfe'),
                    'name' => 'actions',
                    'type' => 'flexible_content',
                    'instructions' => __('Add actions on form submission', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'acfe_flexible_stylised_button' => 1,
                    'layouts' => $layouts,
                    'button_label' => __('Add action', 'acfe'),
                    'min' => '',
                    'max' => '',
                ),
                
                /**
                 * settings
                 */
                array(
                    'key' => 'field_tab_settings',
                    'label' => __('Settings', 'acfe'),
                    'name' => '',
                    'type' => 'tab',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'placement' => 'top',
                    'endpoint' => 0,
                ),
                array(
                    'key' => 'field_location',
                    'label' => __('Field groups locations rules', 'acfe'),
                    'name' => 'location',
                    'type' => 'true_false',
                    'instructions' => __('Apply field groups locations rules on front-end display', 'acfe'),
                    'required' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 0,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'settings',
                ),
                array(
                    'key' => 'field_honeypot',
                    'label' => __('Honeypot', 'acfe'),
                    'name' => 'honeypot',
                    'type' => 'true_false',
                    'instructions' => __('Whether to include a hidden input field to capture non human form submission. Defaults to true.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 1,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'settings',
                ),
                array(
                    'key' => 'field_kses',
                    'label' => __('Kses', 'acfe'),
                    'name' => 'kses',
                    'type' => 'true_false',
                    'instructions' => __('Whether or not to sanitize all $_POST data with the wp_kses_post() function. Defaults to true.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 1,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'settings',
                ),
                array(
                    'key' => 'field_uploader',
                    'label' => __('Uploader', 'acfe'),
                    'name' => 'uploader',
                    'type' => 'radio',
                    'instructions' => __('Whether to use the WP uploader or a basic input for image and file fields. Defaults to \'wp\'.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'choices' => array(
                        'default' => __('Default', 'acfe'),
                        'wp'      => __('WordPress', 'acfe'),
                        'basic'   => __('Browser', 'acfe'),
                    ),
                    'allow_null' => 0,
                    'other_choice' => 0,
                    'default_value' => 'default',
                    'layout' => 'vertical',
                    'return_format' => 'value',
                    'save_other_choice' => 0,
                    'group_with' => 'settings',
                ),
    
                /**
                 * attributes
                 */
                array(
                    'key' => 'field_tab_attributes',
                    'label' => __('Attributes', 'acfe'),
                    'name' => '',
                    'type' => 'tab',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'placement' => 'top',
                    'endpoint' => 0,
                ),
                array(
                    'key' => 'field_form',
                    'label' => __('Form attributes', 'acfe'),
                    'name' => 'form',
                    'type' => 'group',
                    'instructions' => __('Attributes settings related to the form.', 'acfe'),
                    'required' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'layout' => 'block',
                    'acfe_seamless_style' => true,
                    'acfe_group_modal' => 0,
                    'conditional_logic' => array(),
                    'group_with' => 'attributes',
                    'sub_fields' => array(
                        array(
                            'key' => 'field_form_element',
                            'label' => '',
                            'name' => 'element',
                            'type' => 'select',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 'form',
                            'placeholder' => '',
                            'prepend' => 'element',
                            'choices' => array(
                                'form' => '<form>',
                                'div' => '<div>',
                            )
                        ),
                        array(
                            'key' => 'field_form_class',
                            'label' => '',
                            'name' => 'class',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'placeholder' => '',
                            'prepend' => 'form class',
                            'append' => '',
                            'maxlength' => '',
                        ),
                        array(
                            'key' => 'field_form_id',
                            'label' => '',
                            'name' => 'id',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'placeholder' => '',
                            'prepend' => 'form id',
                            'append' => '',
                            'maxlength' => '',
                        ),
        
                    ),
                ),
                array(
                    'key' => 'field_fields',
                    'label' => __('Fields attributes', 'acfe'),
                    'name' => 'fields',
                    'type' => 'group',
                    'instructions' => __('Attributes settings related to the fields.', 'acfe'),
                    'required' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'layout' => 'block',
                    'acfe_seamless_style' => true,
                    'acfe_group_modal' => 0,
                    'conditional_logic' => array(),
                    'group_with' => 'attributes',
                    'sub_fields' => array(
                        array(
                            'key' => 'field_fields_element',
                            'label' => '',
                            'name' => 'element',
                            'type' => 'select',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'prepend' => 'element',
                            'choices' => array(
                                'div' => '&lt;div&gt;',
                                'tr' => '&lt;tr&gt;',
                                'td' => '&lt;td&gt;',
                                'ul' => '&lt;ul&gt;',
                                'ol' => '&lt;ol&gt;',
                                'dl' => '&lt;dl&gt;',
                            ),
                            'allow_null' => 0,
                            'other_choice' => 0,
                            'default_value' => 'div',
                            'return_format' => 'value',
                            'save_other_choice' => 0,
                        ),
                        array(
                            'key' => 'field_fields_wrapper_class',
                            'label' => '',
                            'name' => 'wrapper_class',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'placeholder' => '',
                            'prepend' => 'wrap class',
                            'append' => '',
                            'maxlength' => '',
                        ),
                        array(
                            'key' => 'field_fields_class',
                            'label' => '',
                            'name' => 'class',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'placeholder' => '',
                            'prepend' => 'field class',
                            'append' => '',
                            'maxlength' => '',
                        ),
                        array(
                            'key' => 'field_fields_label',
                            'label' => '',
                            'name' => 'label',
                            'type' => 'select',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'choices' => array(
                                'top'    => __('Top', 'acfe'),
                                'left'   => __('Left', 'acfe'),
                                'hidden' => __('Hidden', 'acfe'),
                            ),
                            'allow_null' => 0,
                            'other_choice' => 0,
                            'default_value' => 'top',
                            'return_format' => 'value',
                            'prepend' => 'label',
                        ),
                        array(
                            'key' => 'field_fields_instruction',
                            'label' => '',
                            'name' => 'instruction',
                            'type' => 'select',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '33.33',
                                'class' => '',
                                'id' => '',
                            ),
                            'choices' => array(
                                'label'       => __('Label', 'acfe'),
                                'field'       => __('Field', 'acfe'),
                                'above_field' => __('Above field', 'acfe'),
                                'tooltip'     => __('Tooltip', 'acfe'),
                            ),
                            'allow_null' => 0,
                            'other_choice' => 0,
                            'default_value' => 'label',
                            'return_format' => 'value',
                            'prepend' => 'instruction',
                        ),
                    ),
                ),
                array(
                    'key' => 'field_submit',
                    'label' => __('Submit button', 'acfe'),
                    'name' => 'submit',
                    'type' => 'true_false',
                    'instructions' => __('Whether or not to create a form submit button. Defaults to true', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 1,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'attributes',
                ),
                array(
                    'key' => 'field_submit_value',
                    'label' => __('Submit value', 'acfe'),
                    'name' => 'submit_value',
                    'type' => 'text',
                    'instructions' => __('The text displayed on the submit button', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_submit',
                                'operator' => '==',
                                'value' => '1',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => 'Submit',
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'maxlength' => '',
                    'group_with' => 'attributes',
                ),
                array(
                    'key' => 'field_submit_button',
                    'label' => __('Submit button', 'acfe'),
                    'name' => 'submit_button',
                    'type' => 'acfe_code_editor',
                    'instructions' => __('HTML used to render the submit button.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_submit',
                                'operator' => '==',
                                'value' => '1',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => '<input type="submit" class="acf-button button button-primary button-large" value="%s" />',
                    'placeholder' => '',
                    'maxlength' => '',
                    'rows' => 2,
                    'group_with' => 'attributes',
                ),
                array(
                    'key' => 'field_submit_spinner',
                    'label' => __('Submit spinner', 'acfe'),
                    'name' => 'submit_spinner',
                    'type' => 'acfe_code_editor',
                    'instructions' => __('HTML used to render the submit button loading spinner.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_submit',
                                'operator' => '==',
                                'value' => '1',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => '<span class="acf-spinner"></span>',
                    'placeholder' => '',
                    'maxlength' => '',
                    'rows' => 2,
                    'group_with' => 'attributes',
                ),
                
                /**
                 * render
                 */
                array(
                    'key' => 'field_tab_render',
                    'label' => __('Render', 'acfe'),
                    'name' => '',
                    'type' => 'tab',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'placement' => 'top',
                    'endpoint' => 0,
                ),
                array(
                    'key' => 'field_render',
                    'label' => __('Form render', 'acfe'),
                    'name' => 'render',
                    'type' => 'acfe_code_editor',
                    'instructions' => __('Render customized form HTML. Leave empty to render form normally.', 'acfe') . '<br /><br />' .
                                      __('Render field group:', 'acfe') . '<br /><code>{render:group_abc123}</code><br/><br/>' .
                                      __('Render field:', 'acfe') . '<br /><code>{render:field_abc123}</code><br/><code>{render:my_field}</code><br/><br/>' .
                                      __('Render all fields:' ,'acfe') . '<br /><code>{render:fields}</code><br/><br/>' .
                                      __('Render submit button:', 'acfe') . '<br /><code>{render:submit}</code>',
                    'required' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => '',
                    'placeholder' => '',
                    'maxlength' => '',
                    'rows' => 18,
                    'conditional_logic' => array(),
                ),
    
                /**
                 * validation
                 */
                array(
                    'key' => 'field_tab_validation',
                    'label' => __('Validation', 'acfe'),
                    'name' => '',
                    'type' => 'tab',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'placement' => 'top',
                    'endpoint' => 0,
                    'group_with' => 'validation',
                ),
                array(
                    'key' => 'field_hide_error',
                    'label' => __('Hide general error', 'acfe'),
                    'name' => 'hide_error',
                    'type' => 'true_false',
                    'instructions' => __('Hide the general error message: "Validation failed. 1 field requires attention"', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 0,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'validation',
                ),
                array(
                    'key' => 'field_hide_revalidation',
                    'label' => __('Hide successful re-validation', 'acfe'),
                    'name' => 'hide_revalidation',
                    'type' => 'true_false',
                    'instructions' => __('Hide "Validation successful" notice when an error has been previously thrown', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_hide_error',
                                'operator' => '!=',
                                'value' => '1',
                            ),
                        )
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 0,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'validation',
                ),
                array(
                    'key' => 'field_hide_unload',
                    'label' => __('Hide confirmation on exit', 'acfe'),
                    'name' => 'hide_unload',
                    'type' => 'true_false',
                    'instructions' => __('Do not prompt user on page refresh', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 0,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'validation',
                ),
                array(
                    'key' => 'field_messages',
                    'label' => __('General error messages', 'acfe'),
                    'name' => 'messages',
                    'type' => 'group',
                    'instructions' => __('Customize general error messages.', 'acfe'),
                    'required' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'layout' => 'block',
                    'acfe_seamless_style' => true,
                    'acfe_group_modal' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_hide_error',
                                'operator' => '!=',
                                'value' => '1',
                            ),
                        )
                    ),
                    'group_with' => 'validation',
                    'sub_fields' => array(
                        array(
                            'key' => 'field_messages_failure',
                            'label' => '',
                            'name' => 'failure',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '50',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 'Validation failed',
                            'placeholder' => '',
                            'prepend' => 'failure',
                            'append' => '',
                            'maxlength' => '',
                        ),
                        array(
                            'key' => 'field_messages_error',
                            'label' => '',
                            'name' => 'error',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '50',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '1 field requires attention',
                            'placeholder' => '',
                            'prepend' => 'error',
                            'append' => '',
                            'maxlength' => '',
                        ),
                        array(
                            'key' => 'field_messages_success',
                            'label' => '',
                            'name' => 'success',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '50',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 'Validation successful',
                            'placeholder' => '',
                            'prepend' => 'success',
                            'append' => '',
                            'maxlength' => '',
                        ),
                        array(
                            'key' => 'field_messages_errors',
                            'label' => '',
                            'name' => 'errors',
                            'type' => 'text',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => array(),
                            'wrapper' => array(
                                'width' => '50',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '%d fields require attention',
                            'placeholder' => '',
                            'prepend' => 'errors',
                            'append' => '',
                            'maxlength' => '',
                        ),
                    
                    ),
                ),
                array(
                    'key' => 'field_errors_position',
                    'label' => __('Fields errors position', 'acfe'),
                    'name' => 'errors_position',
                    'type' => 'radio',
                    'instructions' => __('Choose where to display field errors', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'choices' => array(
                        'above' => __('Above fields', 'acfe'),
                        'below' => __('Below fields', 'acfe'),
                        'group' => __('Group errors', 'acfe'),
                        'hide'  => __('Hide errors', 'acfe'),
                    ),
                    'allow_null' => 0,
                    'other_choice' => 0,
                    'default_value' => 'above',
                    'layout' => 'vertical',
                    'return_format' => 'value',
                    'save_other_choice' => 0,
                    'group_with' => 'validation',
                ),
                array(
                    'key' => 'field_errors_class',
                    'label' => __('Fields errors class', 'acfe'),
                    'name' => 'errors_class',
                    'type' => 'text',
                    'instructions' => __('Add class to the error message', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_errors_position',
                                'operator' => '!=',
                                'value' => 'hide',
                            ),
                        )
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => '',
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'maxlength' => '',
                    'group_with' => 'validation',
                ),
    
                /**
                 * success
                 */
                array(
                    'key' => 'field_tab_success',
                    'label' => __('Success', 'acfe'),
                    'name' => '',
                    'type' => 'tab',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'placement' => 'top',
                    'endpoint' => 0,
                ),
                array(
                    'key' => 'field_success_return',
                    'label' => __('Redirection', 'acfe'),
                    'name' => 'success_return',
                    'type' => 'text',
                    'instructions' => __('The URL to be redirected to after the form is submitted.', 'acfe') . '<br/><br/><u>' . __('This setting is deprecated, use the new "Redirect Action" instead.', 'acfe') . '</u>',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                        'data-enable-switch' => true
                    ),
                    'default_value' => '',
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'maxlength' => '',
                    'group_with' => 'success',
                ),
                array(
                    'key' => 'field_success_hide_form',
                    'label' => __('Hide form', 'acfe'),
                    'name' => 'success_hide_form',
                    'type' => 'true_false',
                    'instructions' => __('Hide form on successful submission', 'acfe'),
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_success_return',
                                'operator' => '==',
                                'value' => '',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 0,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'success',
                ),
                array(
                    'key' => 'field_success_scroll',
                    'label' => __('Scroll to message', 'acfe'),
                    'name' => 'success_scroll',
                    'type' => 'true_false',
                    'instructions' => __('Scroll to message on success', 'acfe'),
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_success_return',
                                'operator' => '==',
                                'value' => '',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'message' => '',
                    'default_value' => 0,
                    'ui' => 1,
                    'ui_on_text' => '',
                    'ui_off_text' => '',
                    'group_with' => 'success',
                ),
                array(
                    'key' => 'field_success_message',
                    'label' => __('Success message', 'acfe'),
                    'name' => 'success_message',
                    'type' => 'wysiwyg',
                    'instructions' => __('The message displayed above the form after the submission.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_success_return',
                                'operator' => '==',
                                'value' => '',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                        'data-instruction-placement' => 'field'
                    ),
                    'default_value' => __('Form updated', 'acfe'),
                    'tabs' => 'all',
                    'toolbar' => 'full',
                    'media_upload' => 1,
                    'delay' => 0,
                    'group_with' => 'success',
                ),
                array(
                    'key' => 'field_success_wrapper',
                    'label' => __('Success wrapper HTML', 'acfe'),
                    'name' => 'success_wrapper',
                    'type' => 'acfe_code_editor',
                    'instructions' => __('HTML used to render the updated message.', 'acfe') . '<br />' .
                                      __('If used, you have to include the following code <code>%s</code> to print the actual "Success message" above.', 'acfe'),
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_success_return',
                                'operator' => '==',
                                'value' => '',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                        'data-instruction-placement' => 'field'
                    ),
                    'default_value' => '<div id="message" class="updated">%s</div>',
                    'placeholder' => '',
                    'maxlength' => '',
                    'rows' => 2,
                    'group_with' => 'success',
                ),
                
            ),
        );
        
        return $field_groups;
        
    }