File: /var/www/html/wp-content/plugins/acf-extended/includes/modules/form/field-group.php
<?php
if(!defined('ABSPATH'))
exit;
$actions_layouts = apply_filters('acfe/form/actions', array());
ksort($actions_layouts);
acf_add_local_field_group(array(
'key' => 'group_acfe_dynamic_form',
'title' => 'Dynamic Form',
'acfe_display_title' => '',
'fields' => array(
/*
* Actions
*/
array(
'key' => 'field_acfe_form_tab_general',
'label' => 'General',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
'data-no-preference' => true,
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_acfe_form_name',
'label' => 'Form name',
'name' => 'acfe_form_name',
'type' => 'acfe_slug',
'instructions' => 'The unique form slug',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_acfe_form_field_groups',
'label' => 'Field groups',
'name' => 'acfe_form_field_groups',
'type' => 'select',
'instructions' => 'Render & map fields of the following field groups',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'choices' => array(
),
'default_value' => array(
),
'allow_null' => 0,
'multiple' => 1,
'ui' => 1,
'ajax' => 0,
'return_format' => 'value',
'placeholder' => '',
),
array(
'key' => 'field_acfe_form_actions',
'label' => 'Actions',
'name' => 'acfe_form_actions',
'type' => 'flexible_content',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'acfe_flexible_stylised_button' => 1,
'acfe_flexible_layouts_thumbnails' => 0,
'acfe_flexible_layouts_templates' => 0,
'acfe_flexible_layouts_placeholder' => 0,
'acfe_flexible_close_button' => 0,
'acfe_flexible_title_edition' => 0,
'acfe_flexible_copy_paste' => 0,
'acfe_flexible_modal_edition' => 0,
'acfe_flexible_modal' => array(
'acfe_flexible_modal_enabled' => '0',
),
'acfe_flexible_layouts_state' => '',
'acfe_flexible_layouts_remove_collapse' => 0,
'layouts' => $actions_layouts,
'button_label' => 'Add action',
'min' => '',
'max' => '',
),
/*
* Settings
*/
array(
'key' => 'field_acfe_form_tab_settings',
'label' => 'Settings',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_acfe_form_field_groups_rules',
'label' => 'Field groups locations rules',
'name' => 'acfe_form_field_groups_rules',
'type' => 'true_false',
'instructions' => 'Apply field groups locations rules for front-end display',
'required' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 0,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
/*
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_field_groups',
'operator' => '>',
'value' => '0',
),
),
),
*/
),
array(
'key' => 'field_acfe_form_form_element',
'label' => 'Form element',
'name' => 'acfe_form_form_element',
'type' => 'true_false',
'instructions' => 'Whether or not to create a <code><form></code> element',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 1,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_attributes',
'label' => 'Form attributes',
'name' => 'acfe_form_attributes',
'type' => 'group',
'instructions' => 'Form class and id',
'required' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'layout' => 'block',
'acfe_seamless_style' => true,
'acfe_group_modal' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_form_element',
'operator' => '==',
'value' => '1',
),
),
),
'sub_fields' => array(
array(
'key' => 'field_acfe_form_attributes_class',
'label' => '',
'name' => 'acfe_form_attributes_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '33',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => 'acf-form',
'placeholder' => '',
'prepend' => 'class',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_acfe_form_attributes_id',
'label' => '',
'name' => 'acfe_form_attributes_id',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '33',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => 'id',
'append' => '',
'maxlength' => '',
),
/*
array(
'key' => 'field_acfe_form_attributes_action',
'label' => '',
'name' => 'acfe_form_attributes_action',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '25',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => 'action',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_acfe_form_attributes_method',
'label' => '',
'name' => 'acfe_form_attributes_method',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '25',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => 'post',
'placeholder' => '',
'prepend' => 'method',
'append' => '',
'maxlength' => '',
),
*/
),
),
array(
'key' => 'field_acfe_form_fields_attributes',
'label' => 'Fields class',
'name' => 'acfe_form_fields_attributes',
'type' => 'group',
'instructions' => 'Add class to all fields',
'required' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'layout' => 'block',
'acfe_seamless_style' => true,
'acfe_group_modal' => 0,
'conditional_logic' => array(),
'sub_fields' => array(
array(
'key' => 'field_acfe_form_fields_wrapper_class',
'label' => '',
'name' => 'acfe_form_fields_wrapper_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '33',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => 'wrapper class',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_acfe_form_fields_class',
'label' => '',
'name' => 'acfe_form_fields_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '33',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => 'input class',
'append' => '',
'maxlength' => '',
),
),
),
array(
'key' => 'field_acfe_form_form_submit',
'label' => 'Submit button',
'name' => 'acfe_form_form_submit',
'type' => 'true_false',
'instructions' => 'Whether or not to create a form submit button. Defaults to true',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 1,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_submit_value',
'label' => 'Submit value',
'name' => 'acfe_form_submit_value',
'type' => 'text',
'instructions' => 'The text displayed on the submit button',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_form_submit',
'operator' => '==',
'value' => '1',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => 'Submit',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_acfe_form_html_submit_button',
'label' => 'Submit button',
'name' => 'acfe_form_html_submit_button',
'type' => 'acfe_code_editor',
'instructions' => 'HTML used to render the submit button.',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_form_submit',
'operator' => '==',
'value' => '1',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '<input type="submit" class="acf-button button button-primary button-large" value="%s" />',
'placeholder' => '',
'maxlength' => '',
'rows' => 2,
),
array(
'key' => 'field_acfe_form_html_submit_spinner',
'label' => 'Submit spinner',
'name' => 'acfe_form_html_submit_spinner',
'type' => 'acfe_code_editor',
'instructions' => 'HTML used to render the submit button loading spinner.',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_form_submit',
'operator' => '==',
'value' => '1',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '<span class="acf-spinner"></span>',
'placeholder' => '',
'maxlength' => '',
'rows' => 2,
),
/*
array(
'key' => 'field_acfe_form_post_field_groups',
'label' => 'Post field groups',
'name' => 'acfe_form_post_field_groups',
'type' => 'post_object',
'instructions' => 'Override rendered field groups with a specific post field groups.<br /><br/>Note: Make sure to set the related field groups in the "General" tab in order to map fields in the actions tab',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'allow_null' => 1,
'multiple' => 0,
'return_format' => 'value',
'placeholder' => '',
),
*/
array(
'key' => 'field_acfe_form_honeypot',
'label' => 'Honeypot',
'name' => 'acfe_form_honeypot',
'type' => 'true_false',
'instructions' => 'Whether to include a hidden input field to capture non human form submission. Defaults to true.',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 1,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_kses',
'label' => 'Kses',
'name' => 'acfe_form_kses',
'type' => 'true_false',
'instructions' => 'Whether or not to sanitize all $_POST data with the wp_kses_post() function. Defaults to true.',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 1,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_uploader',
'label' => 'Uploader',
'name' => 'acfe_form_uploader',
'type' => 'radio',
'instructions' => 'Whether to use the WP uploader or a basic input for image and file fields. Defaults to \'wp\'
Choices of \'wp\' or \'basic\'.',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'choices' => array(
'default' => 'Default (Field based)',
'wp' => 'WordPress',
'basic' => 'Browser',
),
'allow_null' => 0,
'other_choice' => 0,
'default_value' => 'default',
'layout' => 'vertical',
'return_format' => 'value',
'save_other_choice' => 0,
),
array(
'key' => 'field_acfe_form_form_field_el',
'label' => 'Field element',
'name' => 'acfe_form_form_field_el',
'type' => 'radio',
'instructions' => 'Determines element used to wrap a field. Defaults to \'div\'',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'choices' => array(
'div' => '<div>',
'tr' => '<tr>',
'td' => '<td>',
'ul' => '<ul>',
'ol' => '<ol>',
'dl' => '<dl>',
),
'allow_null' => 0,
'other_choice' => 0,
'default_value' => 'div',
'layout' => 'vertical',
'return_format' => 'value',
'save_other_choice' => 0,
),
array(
'key' => 'field_acfe_form_label_placement',
'label' => 'Label placement',
'name' => 'acfe_form_label_placement',
'type' => 'radio',
'instructions' => 'Determines where field labels are places in relation to fields. Defaults to \'top\'. <br />
Choices of \'top\' (Above fields) or \'left\' (Beside fields)',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'choices' => array(
'top' => 'Top',
'left' => 'Left',
'hidden' => 'Hidden',
),
'allow_null' => 0,
'other_choice' => 0,
'default_value' => 'top',
'layout' => 'vertical',
'return_format' => 'value',
'save_other_choice' => 0,
),
array(
'key' => 'field_acfe_form_instruction_placement',
'label' => 'Instruction placement',
'name' => 'acfe_form_instruction_placement',
'type' => 'radio',
'instructions' => 'Determines where field instructions are places in relation to fields. Defaults to \'label\'. <br />
Choices of \'label\' (Below labels) or \'field\' (Below fields)',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'choices' => array(
'label' => 'Label',
'field' => 'Field',
),
'allow_null' => 0,
'other_choice' => 0,
'default_value' => 'label',
'layout' => 'vertical',
'return_format' => 'value',
'save_other_choice' => 0,
),
/*
* HTML
*/
array(
'key' => 'field_acfe_form_tab_html',
'label' => 'HTML',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_acfe_form_custom_html_enable',
'label' => 'Override Form render',
'name' => 'acfe_form_custom_html_enable',
'type' => 'true_false',
'instructions' => 'Override the native field groups HTML render',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => false,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_html_before_fields',
'label' => 'HTML Before render',
'name' => 'acfe_form_html_before_fields',
'type' => 'acfe_code_editor',
'instructions' => 'Extra HTML to add before the fields',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'maxlength' => '',
'rows' => 2,
),
array(
'key' => 'field_acfe_form_custom_html',
'label' => 'HTML Form render',
'name' => 'acfe_form_custom_html',
'type' => 'acfe_code_editor',
'instructions' => 'Render your own customized HTML.<br /><br />
Field groups may be included using <code>{field_group:group_key}</code><br/><code>{field_group:Group title}</code><br/><br/>
Fields may be included using <code>{field:field_key}</code><br/><code>{field:field_name}</code>',
'required' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'maxlength' => '',
'rows' => 12,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_custom_html_enable',
'operator' => '==',
'value' => '1',
),
),
),
),
array(
'key' => 'field_acfe_form_html_after_fields',
'label' => 'HTML After render',
'name' => 'acfe_form_html_after_fields',
'type' => 'acfe_code_editor',
'instructions' => 'Extra HTML to add after the fields',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'maxlength' => '',
'rows' => 2,
),
/*
* Validation
*/
array(
'key' => 'field_acfe_form_tab_validation',
'label' => 'Validation',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_acfe_form_hide_error',
'label' => 'Hide general error',
'name' => 'acfe_form_hide_error',
'type' => 'true_false',
'instructions' => 'Hide the general error message: "Validation failed. 1 field requires attention"',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 0,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_hide_revalidation',
'label' => 'Hide successful re-validation',
'name' => 'acfe_form_hide_revalidation',
'type' => 'true_false',
'instructions' => 'Hide the successful notice when an error has been thrown',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 0,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_hide_unload',
'label' => 'Hide confirmation on exit',
'name' => 'acfe_form_hide_unload',
'type' => 'true_false',
'instructions' => 'Do not prompt user on page refresh',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 0,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_errors_position',
'label' => 'Fields errors position',
'name' => 'acfe_form_errors_position',
'type' => 'radio',
'instructions' => 'Choose where to display field errors',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'choices' => array(
'above' => 'Above fields',
'below' => 'Below fields',
'group' => 'Group errors',
'hide' => 'Hide errors',
),
'allow_null' => 0,
'other_choice' => 0,
'default_value' => 'above',
'layout' => 'vertical',
'return_format' => 'value',
'save_other_choice' => 0,
),
array(
'key' => 'field_acfe_form_errors_class',
'label' => 'Fields errors class',
'name' => 'acfe_form_errors_class',
'type' => 'text',
'instructions' => 'Add class to error message',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_errors_position',
'operator' => '!=',
'value' => 'group',
),
array(
'field' => 'field_acfe_form_errors_position',
'operator' => '!=',
'value' => 'hide',
),
)
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
/*
array(
'key' => 'field_acfe_form_validation_advanced_field_validation',
'label' => 'PHP Field Validation',
'name' => 'acfe_form_validation_advanced_field_validation',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Native ACF field validation example',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
),
array(
'key' => 'field_acfe_form_validation_advanced_form_validation',
'label' => 'PHP Form Validation',
'name' => 'acfe_form_validation_advanced_form_validation',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Global form validation example',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
),
*/
/*
* Actions
*/
/*
array(
'key' => 'field_acfe_form_tab_actions',
'label' => 'Actions',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
*/
/*
* Submission
*/
array(
'key' => 'field_acfe_form_tab_submission',
'label' => 'Success Page',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_acfe_form_return',
'label' => 'Redirection',
'name' => 'acfe_form_return',
'type' => 'text',
'instructions' => 'The URL to be redirected to after the form is submitted. See "Cheatsheet" tab for all available template tags.<br/><br/><u>This setting is deprecated, use the new "Redirect Action" instead.</u>',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
'data-enable-switch' => true
),
'acfe_permissions' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_acfe_form_updated_hide_form',
'label' => 'Hide form',
'name' => 'acfe_form_updated_hide_form',
'type' => 'true_false',
'instructions' => 'Hide form on successful submission',
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_return',
'operator' => '==',
'value' => '',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'message' => '',
'default_value' => 0,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_acfe_form_updated_message',
'label' => 'Success message',
'name' => 'acfe_form_updated_message',
'type' => 'wysiwyg',
'instructions' => 'A message displayed above the form after being redirected. See "Cheatsheet" tab for all available template tags.',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_return',
'operator' => '==',
'value' => '',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
'data-instruction-placement' => 'field'
),
'acfe_permissions' => '',
'default_value' => __('Post updated', 'acf'),
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
'delay' => 0,
),
array(
'key' => 'field_acfe_form_html_updated_message',
'label' => 'Success wrapper HTML',
'name' => 'acfe_form_html_updated_message',
'type' => 'acfe_code_editor',
'instructions' => 'HTML used to render the updated message.<br />
If used, you have to include the following code <code>%s</code> to print the actual "Success message" above.',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_acfe_form_return',
'operator' => '==',
'value' => '',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
'data-instruction-placement' => 'field'
),
'acfe_permissions' => '',
'default_value' => '<div id="message" class="updated">%s</div>',
'placeholder' => '',
'maxlength' => '',
'rows' => 2,
),
/*
array(
'key' => 'field_acfe_form_submission_advanced_submission_php',
'label' => 'PHP Form Submit: Custom Action',
'name' => 'acfe_form_submission_advanced_submission_php',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Trigger a custom action on form submission',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
),
array(
'key' => 'field_acfe_form_submission_advanced_submission_js',
'label' => 'Javascript Form Submit: Custom Action',
'name' => 'acfe_form_submission_advanced_submission_js',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Trigger a custom JS action on form submission',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
),
*/
/*
* Cheatsheet
*/
array(
'key' => 'field_acfe_form_tab_cheatsheet',
'label' => 'Cheatsheet',
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'acfe_permissions' => '',
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_acfe_form_cheatsheet_field',
'label' => 'Field',
'name' => 'acfe_form_cheatsheet_field',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve user input from the current form',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_fields',
'label' => 'Fields',
'name' => 'acfe_form_cheatsheet_fields',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve all user inputs from the current form',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_get_field',
'label' => 'Get Field',
'name' => 'acfe_form_cheatsheet_get_field',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve ACF field value from database',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_get_option',
'label' => 'Get Option',
'name' => 'acfe_form_cheatsheet_get_option',
'type' => 'acfe_dynamic_message',
'value' => '',
'instructions' => 'Retrieve option value from database',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_request',
'label' => 'Request',
'name' => 'acfe_form_cheatsheet_request',
'type' => 'acfe_dynamic_message',
'value' => '',
'instructions' => 'Retrieve <code>$_REQUEST</code> value',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_query_var',
'label' => 'Query Var',
'name' => 'acfe_form_cheatsheet_query_var',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve query var values. Can be used to get data from previous action',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_current_form',
'label' => 'Form Settings',
'name' => 'acfe_form_cheatsheet_current_form',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve current Dynamic Form data',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_actions_post',
'label' => 'Action Output: Post',
'name' => 'acfe_form_cheatsheet_actions_post',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve actions output',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'acfe_form_cheatsheet_actions_term',
'label' => 'Action Output: Term',
'name' => 'acfe_form_cheatsheet_actions_term',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve actions output',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'acfe_form_cheatsheet_actions_user',
'label' => 'Action Output: User',
'name' => 'acfe_form_cheatsheet_actions_user',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve actions output',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'acfe_form_cheatsheet_actions_email',
'label' => 'Action Output: Email',
'name' => 'acfe_form_cheatsheet_actions_email',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve actions output',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_current_post',
'label' => 'Current Post',
'name' => 'acfe_form_cheatsheet_current_post',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve current post data (where the form is being printed)',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_current_term',
'label' => 'Current Term',
'name' => 'acfe_form_cheatsheet_current_term',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve current term data (where the form is being printed)',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_current_user',
'label' => 'Current User',
'name' => 'acfe_form_cheatsheet_current_user',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve currently logged user data',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
array(
'key' => 'field_acfe_form_cheatsheet_current_author',
'label' => 'Current Author',
'name' => 'acfe_form_cheatsheet_current_author',
'type' => 'acfe_dynamic_message',
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
'instructions' => 'Retrieve current post author data (where the form is being printed)',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
),
),
'location' => array(
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'acfe-form',
),
),
),
'menu_order' => 0,
'position' => 'acf_after_title',
'style' => 'default',
'label_placement' => 'left',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => true,
'description' => '',
'acfe_permissions' => '',
'acfe_form' => 0,
'acfe_meta' => '',
'acfe_note' => '',
));