in web/wp-content/plugins/acf-extended/includes/modules/form/module-form-action-email.php [511:931]
function register_layout($layout){
return array(
/**
* documentation
*/
array(
'key' => 'field_doc',
'label' => '',
'name' => '',
'type' => 'acfe_dynamic_render',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'render' => function(){
echo '<a href="https://www.acf-extended.com/features/modules/dynamic-forms/e-mail-action" target="_blank">' . __('Documentation', 'acfe') . '</a>';
}
),
/**
* action
*/
array(
'key' => 'field_tab_action',
'label' => __('Action', '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' => __('Action name', 'acfe'),
'name' => 'name',
'type' => 'acfe_slug',
'instructions' => __('(Optional) Target this action using hooks.', 'acfe'),
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
'data-instruction-placement' => 'field'
),
'default_value' => '',
'placeholder' => __('Email', 'acfe'),
'prepend' => '',
'append' => '',
'maxlength' => '',
),
/**
* email
*/
array(
'key' => 'field_tab_email',
'label' => __('Email', 'acfe'),
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_email_from',
'label' => __('From', 'acfe'),
'name' => 'email_from',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => __('Name <email@domain.com>', 'acfe'),
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_email_to',
'label' => __('To', 'acfe'),
'name' => 'email_to',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => __('email@domain.com', 'acfe'),
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_email_reply_to',
'label' => __('Reply to', 'acfe'),
'name' => 'email_reply_to',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => __('Name <email@domain.com>', 'acfe'),
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_email_cc',
'label' => __('Cc', 'acfe'),
'name' => 'email_cc',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => __('email@domain.com', 'acfe'),
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_email_bcc',
'label' => __('Bcc', 'acfe'),
'name' => 'email_bcc',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => __('email@domain.com', 'acfe'),
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_email_subject',
'label' => __('Subject', 'acfe'),
'name' => 'email_subject',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_email_content_group',
'label' => __('Content', 'acfe'),
'name' => 'email_content_group',
'type' => 'group',
'instructions' => __('Render customized email content.', 'acfe') . '<br /><br />' .
__('Render all fields values:' ,'acfe') . '<br /><code>{fields}</code><br/><br/>' .
__('Render field value:', 'acfe') . '<br /><code>{field:field_abc123}</code><br/><code>{field:my_field}</code>',
'required' => 0,
'conditional_logic' => array(),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'layout' => 'block',
'acfe_seamless_style' => true,
'acfe_group_modal' => 0,
'sub_fields' => array(
array(
'key' => 'field_email_content_type',
'label' => '',
'name' => 'content_type',
'type' => 'select',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'editor' => __('Content Editor', 'acfe'),
'html' => __('Raw HTML', 'acfe'),
),
'default_value' => array('custom'),
'allow_null' => 0,
'multiple' => 0,
'ui' => 0,
'return_format' => 'value',
'placeholder' => __('Default', 'acfe'),
'ajax' => 0,
'allow_custom' => 0,
),
array(
'key' => 'field_email_content_editor',
'label' => '',
'name' => 'content_editor',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_email_content_type',
'operator' => '==',
'value' => 'editor',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
'delay' => 0,
),
array(
'key' => 'field_email_content_html',
'label' => '',
'name' => 'content_html',
'type' => 'acfe_code_editor',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_email_content_type',
'operator' => '==',
'value' => 'html',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'rows' => 18,
),
),
),
/**
* attachments
*/
array(
'key' => 'field_tab_attachments',
'label' => __('Attachments', 'acfe'),
'name' => '',
'type' => 'tab',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'placement' => 'top',
'endpoint' => 0,
),
array(
'key' => 'field_files',
'label' => __('Dynamic files', 'acfe'),
'name' => 'files',
'type' => 'repeater',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'collapsed' => '',
'min' => 0,
'max' => 0,
'layout' => 'table',
'button_label' => __('Add file', 'acfe'),
'sub_fields' => array(
array(
'key' => 'field_files_file',
'label' => __('File', 'acfe'),
'name' => 'file',
'type' => 'select',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(),
'default_value' => array(),
'allow_null' => 0,
'multiple' => 0,
'ui' => 1,
'return_format' => 'value',
'ajax' => 1,
'placeholder' => '',
'search_placeholder' => __('Select a field or enter a custom value/template tag.', 'acfe'),
'allow_custom' => 1,
'ajax_action' => 'acfe/form/map_field_ajax',
),
array(
'key' => 'field_files_delete',
'label' => __('Delete file', 'acfe'),
'name' => 'delete',
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'message' => __('Delete file once sent', 'acfe'),
'default_value' => 0,
'ui' => 1,
'ui_on_text' => '',
'ui_off_text' => '',
),
),
),
array(
'key' => 'field_files_static',
'label' => __('Static files', 'acfe'),
'name' => 'files_static',
'type' => 'repeater',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'collapsed' => '',
'min' => 0,
'max' => 0,
'layout' => 'table',
'button_label' => __('Add file', 'acfe'),
'sub_fields' => array(
array(
'key' => 'field_file_static',
'label' => __('File', 'acfe'),
'name' => 'file',
'type' => 'file',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'id',
),
),
),
);
}