* HELP TEXT */ 'help_text' => array( 'name' => 'help_text', 'type' => 'rte', 'label' => '', 'width' => 'full', 'group' => 'advanced', 'value' => '', 'use_merge_tags' => true, ), ), ), /* * DESCRIPTION */ 'description' => array( 'name' => 'description', 'type' => 'fieldset', 'label' => esc_html__( 'Description', 'ninja-forms' ), 'group' => 'display', 'settings' => array( /* * DESCRIPTION TEXT */ 'desc_text' => array( 'name' => 'desc_text', 'type' => 'rte', 'label' => '', 'width' => 'full', 'use_merge_tags' => true, ), ), ), /* * NUMERIC SORT */ 'num_sort' => array( 'name' => 'num_sort', 'type' => 'toggle', 'label' => esc_html__( 'Sort as Numeric', 'ninja-forms'), 'width' => 'full', 'group' => 'administration', 'value' => '', 'help' => esc_html__( 'This column in the submissions table will sort by number.', 'ninja-forms' ), ), 'personally_identifiable' => array( 'name' => 'personally_identifiable', 'type' => 'toggle', 'group' => 'advanced', 'label' => esc_html__( 'This Field Is Personally Identifiable Data', 'ninja-forms' ), 'width' => 'full', 'value' => '', 'help' => esc_html__( 'This option helps with privacy regulation compliance', 'ninja-forms' ), ), /* |-------------------------------------------------------------------------- | Display Settings |-------------------------------------------------------------------------- */ // Multi-Select List Only 'multi_size' => array( 'name' => 'multi_size', 'type' => 'number', 'label' => esc_html__( 'Multi-Select Box Size', 'ninja-forms'), 'width' => 'one-half', 'group' => 'advanced', 'value' => 5, ), /* |-------------------------------------------------------------------------- | Un-Grouped Settings |-------------------------------------------------------------------------- | | Hidden from grouped listings, but still searchable. | */ 'manual_key' => array( 'name' => 'manual_key', 'type' => 'bool', 'value' => FALSE, ), 'timed_submit_label' => array( 'name' => 'timed_submit_label', 'type' => 'textbox', 'label' => esc_html__( 'Label', 'ninja-forms' ), //The following text appears below the element //'Submit button text after timer expires' 'width' => '', 'group' => '', 'value' => '', 'use_merge_tags' => TRUE, ), /* * Timed Submit Timer */ 'timed_submit_timer' => array( 'name' => 'timed_submit_timer', 'type' => 'textbox', 'label' => esc_html__( 'Label' , 'ninja-forms' ), // This text was located below the element '%n will be used to signfify the number of seconds' 'value' => sprintf( esc_textarea( __( 'Please wait %s seconds', 'ninja-forms' ) ), '%n'), 'width' => '', 'group' => '', ), /* * Timed Submit Countdown */ 'timed_submit_countdown' => array ( 'name' => 'timed_submit_countdown', 'type' => 'number', 'label' => esc_html__( 'Number of seconds for the countdown', 'ninja-forms' ), //The following text appears to the right of the element //"This is how long the user must waitin to submit the form" 'value' => 10, 'width' => '', 'group' => '', ), /* * Password Registration checkbox */ 'password_registration_checkbox' => array( 'name' => 'password_registration_checkbox', 'type' => 'checkbox', 'value' => 'unchecked', 'label' => esc_html__( 'Use this as a registration password field. If this box is check, both password and re-password textboxes will be output', 'ninja-forms' ), 'width' => '', 'group' => '', ), /* * Number of Stars Textbox */ 'number_of_stars' => array( 'name' => 'number_of_stars', 'type' => 'textbox', 'value' => 5, 'label' => esc_html__( 'Number of stars', 'ninja-forms' ), 'width' => 'full', 'group' => '', ), /* * Disable Browser Autocomplete */ 'disable_browser_autocomplete' => array( 'name' => 'disable_browser_autocomplete', 'type' => 'toggle', 'label' => esc_html__( 'Disable Browser Autocomplete', 'ninja-forms' ), 'width' => 'full', 'group' => 'restrictions', ), /* * Disable input */ 'disable_input' => array( 'name' => 'disable_input', 'type' => 'toggle', 'label' => esc_html__( 'Disable Input', 'ninja-forms' ), 'width' => 'full', 'group' => 'restrictions', ), //TODO: Ask about the list of states and countries. /* * Country - Use Custom First Option */ 'use_custom_first_option' => array( 'name' => 'use_custom_first_option', 'type' => 'checkbox', 'value' => 'unchecked', 'label' => esc_html__( 'Use a custom first option', 'ninja-forms' ), 'width' => '', 'group' => '', ), /* * Country - Custom first option */ 'custom_first_option' => array( 'name' => 'custom_first_option', 'type' => 'textbox', 'label' => esc_html__( 'Custom first option', 'ninja-forms' ), 'width' => '', 'group' => '', 'value' => FALSE, ), 'type' => array( 'name' => 'type', 'type' => 'select', 'options' => array(), 'label' => esc_html__( 'Type', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => 'single', ), 'fieldset' => array( 'name' => 'fieldset', 'type' => 'fieldset', 'label' => esc_html__( 'Settings', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'settings' => array(), ), 'confirm_field' => array( 'name' => 'confirm_field', 'type' => 'field-select', 'label' => esc_html__( 'Confirm', 'ninja-forms' ), 'width' => 'full', '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_textarea( __( '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' ) // ); Another Elaborate Fort - Clover Lane