'group' => 'primary'
),
/*
|--------------------------------------------------------------------------
| Textarea Settings
|--------------------------------------------------------------------------
*/
'textarea_rte' => array(
'name' => 'textarea_rte',
'type' => 'toggle',
'label' => esc_html__( 'Show Rich Text Editor', 'ninja-forms' ),
'width' => 'one-third',
'group' => 'display',
'value' => '',
'help' => esc_html__( 'Allows rich text input.', 'ninja-forms' ),
),
'textarea_media' => array(
'name' => 'textarea_media',
'type' => 'toggle',
'label' => esc_html__( 'Show Media Upload Button', 'ninja-forms' ),
'width' => 'one-third',
'group' => 'display',
'value' => '',
'deps' => array(
'textarea_rte' => 1
)
),
'disable_rte_mobile' => array(
'name' => 'disable_rte_mobile',
'type' => 'toggle',
'label' => esc_html__( 'Disable Rich Text Editor on Mobile', 'ninja-forms' ),
'width' => 'one-third',
'group' => 'display',
'value' => '',
'deps' => array(
'textarea_rte' => 1
)
),
/*
|--------------------------------------------------------------------------
| Submit Button Settings
|--------------------------------------------------------------------------
*/
'processing_label' => array(
'name' => 'processing_label',
'type' => 'textbox',
'label' => esc_html__( 'Processing Label', 'ninja-forms' ),
'width' => 'full',
'group' => 'primary',
'value' => esc_html__( 'Processing', 'ninja-forms' )
),
/*
|--------------------------------------------------------------------------
| Calc Value that is used for checkbox fields
|--------------------------------------------------------------------------
*/
'checked_calc_value' => array(
'name' => 'checked_calc_value',
'type' => 'textbox',
'label' => esc_html__( 'Checked Calculation Value', 'ninja-forms' ),
'width' => 'one-half',
'group' => 'advanced',
'help' => esc_html__( 'This number will be used in calculations if the box is checked.', 'ninja-forms' ),
),
'unchecked_calc_value' => array(
'name' => 'unchecked_calc_value',
'type' => 'textbox',
'label' => esc_html__( 'Unchecked Calculation Value', 'ninja-forms' ),
'width' => 'one-half',
'group' => 'advanced',
'help' => esc_html__( 'This number will be used in calculations if the box is unchecked.', 'ninja-forms' ),
),
/*
|--------------------------------------------------------------------------
| DISPLAY CALCULATION SETTINGS
|--------------------------------------------------------------------------
*/
'calc_var' => array(
'name' => 'calc_var',
'type' => 'select',
'label' => esc_html__( 'Display This Calculation Variable', 'ninja-forms' ),
'width' => 'full',
'group' => 'primary',
'options' => array(),
'select_product' => array(
'value' => '',
'label' => esc_html__( '- Select a Variable', 'ninja-forms' ),
),
),
/*
|--------------------------------------------------------------------------
| Pricing Fields Settings
|--------------------------------------------------------------------------
*/
'product_price' => array(
'name' => 'product_price',
'type' => 'textbox',
'label' => esc_html__( 'Price', 'ninja-forms' ),
'width' => 'one-half',
'group' => 'primary',
'value' => '1.00',
'mask' => array(
'type' => 'currency', // 'numeric', 'currency', 'custom'
'options' => array()
)
),
'product_use_quantity' => array(
'name' => 'product_use_quantity',
'type' => 'toggle',
'label' => esc_html__( 'Use Inline Quantity', 'ninja-forms' ),
'width' => 'one-half',
'group' => 'primary',
'value' => TRUE,
'help' => esc_html__( 'Allows users to choose more than one of this product.', 'ninja-forms' ),
),
'product_type' => array(
'name' => 'product_type',
'type' => 'select',
'label' => esc_html__( 'Product Type', 'ninja-forms' ),
'width' => 'full',
'group' => '',
'options' => array(
array(
'label' => esc_html__( 'Single Product (default)', 'ninja-forms' ),
'value' => 'single'
),
array(
'label' => esc_html__( 'Multi Product - Dropdown', 'ninja-forms' ),
'value' => 'dropdown'
),
array(
'label' => esc_html__( 'Multi Product - Choose Many', 'ninja-forms' ),
'value' => 'checkboxes'
),
array(
'label' => esc_html__( 'Multi Product - Choose One', 'ninja-forms' ),
'value' => 'radiolist'
),
array(
'label' => esc_html__( 'User Entry', 'ninja-forms' ),
'value' => 'user'
),
array(
'label' => esc_html__( 'Hidden', 'ninja-forms' ),
'value' => 'hidden'
),
),
'value' => 'single',
'use_merge_tags' => FALSE
),
'shipping_cost' => array(
'name' => 'shipping_cost',
'type' => 'textbox',
'label' => esc_html__( 'Cost', 'ninja-forms' ),
'width' => 'full',
'group' => 'primary',
'value' => '0.00',
'mask' => array(
'type' => 'currency', // 'numeric', 'currency', 'custom'
'options' => array()
),
'deps' => array(
'shipping_type' => 'single',
),
),
'shipping_options' => array(
'name' => 'shipping_options',
'type' => 'option-repeater',
'label' => esc_html__( 'Cost Options', 'ninja-forms' ) . ' ' . esc_html__( 'Add New', 'ninja-forms' ) . '',
'width' => 'full',
'group' => 'primary',
'value' => array(
array( 'label' => esc_textarea( __( 'One', 'ninja-forms' ) ), 'value' => '1.00', 'order' => 0 ),
array( 'label' => esc_textarea( __( 'Two', 'ninja-forms' ) ), 'value' => '2.00', 'order' => 1 ),
array( 'label' => esc_textarea( __( 'Three', 'ninja-forms' ) ), 'value' => '3.00', 'order' => 2 ),
),
'columns' => array(
'label' => array(
'header' => esc_html__( 'Label', 'ninja-forms' ),
'default' => '',
),
'value' => array(
'header' => esc_html__( 'Value', 'ninja-forms' ),
'default' => '',
),
),
'deps' => array(
'shipping_type' => 'select'
),
),
'shipping_type' => array(
'name' => 'shipping_type',
'type' => 'select',
'options' => array(
array(
'label' => esc_html__( 'Single Cost', 'ninja-forms' ),
'value' => 'single',
),
array(
'label' => esc_html__( 'Cost Dropdown', 'ninja-forms' ),
'value' => 'select',
),
),
'label' => esc_html__( 'Cost Type', 'ninja-forms' ),
'width' => 'full',
'group' => '', //'primary',
'value' => 'single',
),
'product_assignment' => array(
'name' => 'product_assignment',
'type' => 'select',
'label' => esc_html__( 'Product', 'ninja-forms' ),
'width' => 'full',
'group' => 'primary',
'options' => array(),
'select_product' => array(
'value' => '',
'label' => esc_html__( '- Select a Product', 'ninja-forms' ),
),
),
/*
|--------------------------------------------------------------------------
| Anti-Spam Field Settings
|--------------------------------------------------------------------------
*/
/*
* Spam Answer
*/
'spam_answer' => array(
'name' => 'spam_answer',
'type' => 'textbox',
'label' => esc_html__( 'Answer', 'ninja-forms'),
'width' => 'full',
'group' => 'primary',
'value' => '',
'help' => esc_html__( 'A case sensitive answer to help prevent spam submissions of your form.', 'ninja-forms' ),
),
/*
|--------------------------------------------------------------------------
| Term Field Settings
|--------------------------------------------------------------------------
*/
/*
* Taxonomy
*/
'taxonomy' => array(
'name' => 'taxonomy',
'type' => 'select',
'label' => esc_html__( 'Taxonomy', 'ninja-forms'),
'width' => 'full',
'group' => 'primary',
'options' => array(
array(
'label' => "-",
'value' => ''
)
)
),
/*
* Add New Terms
*/
'add_new_terms' => array(
'name' => 'add_new_terms',
'type' => 'toggle',
'label' => esc_html__( 'Add New Terms', 'ninja-forms'),
'width' => 'full',
'group' => 'advanced',
),
/*
|--------------------------------------------------------------------------
| Backwards Compatibility Field Settings
|--------------------------------------------------------------------------
*/
'user_state' => array(
'name' => 'user_state',
'type' => 'toggle',
'label' => esc_html__( 'This is a user\'s state.', 'ninja-forms' ),
'width' => 'full',
'group' => 'administration',
'value' => FALSE,
'help' => esc_html__( 'Used for marking a field for processing.', 'ninja-forms' ),
),
));
// Example of settings
// Add all core settings. Fields can unset if unneeded.
// $this->_settings = $this->load_settings(
// array( 'label', 'label_pos', 'required', 'number', 'spam_question', 'mask', 'input_limit_set','rich_text_editor', 'placeholder', 'textare_placeholder', 'default', 'checkbox_default_value', 'classes', 'timed_submit' )
// );