me' => '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' ), ), /* |-------------------------------------------------------------------------- | Signature Field Settings |-------------------------------------------------------------------------- */ /* * Signature Method */ 'signature_method' => array( 'name' => 'signature_method', 'type' => 'select', 'label' => esc_html__( 'Signature Method', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => 'both', 'options' => array( array( 'label' => esc_html__( 'Typed Only', 'ninja-forms' ), 'value' => 'typed' ), array( 'label' => esc_html__( 'Drawn Only', 'ninja-forms' ), 'value' => 'drawn' ), array( 'label' => esc_html__( 'Both Options', 'ninja-forms' ), 'value' => 'both' ), ), 'help' => esc_html__( 'Choose whether users can type their name, draw their signature, or have both options.', 'ninja-forms' ) ), /* * Signature Font */ 'signature_font' => array( 'name' => 'signature_font', 'type' => 'select', 'label' => esc_html__( 'Typed Signature Font', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => 'dancing-script', 'options' => array( array( 'label' => 'Dancing Script', 'value' => 'dancing-script' ), array( 'label' => 'Satisfy', 'value' => 'satisfy' ), array( 'label' => 'Cursive (System)', 'value' => 'cursive' ), ), 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'typed' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), 'help' => esc_html__( 'Select the font to use for typed signatures.', 'ninja-forms' ) ), /* * Typed Signature Placeholder */ 'typed_placeholder' => array( 'name' => 'typed_placeholder', 'type' => 'textbox', 'label' => esc_html__( 'Typed Signature Placeholder', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => esc_html__( 'John Doe', 'ninja-forms' ), 'help' => esc_html__( 'Placeholder text for the typed signature input field.', 'ninja-forms' ), 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'typed' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), ), /* * Drawn Signature Placeholder */ 'drawn_placeholder' => array( 'name' => 'drawn_placeholder', 'type' => 'textbox', 'label' => esc_html__( 'Drawn Signature Placeholder', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => esc_html__( 'Sign here', 'ninja-forms' ), 'help' => esc_html__( 'Placeholder text for the drawn signature canvas area.', 'ninja-forms' ), 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'drawn' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), ), /* * Canvas Width */ 'canvas_width' => array( 'name' => 'canvas_width', 'type' => 'number', 'label' => esc_html__( 'Canvas Width (px)', 'ninja-forms' ), 'width' => 'one-half', 'group' => 'primary', 'value' => 400, 'help' => esc_html__( 'Width of the signature drawing area in pixels.', 'ninja-forms' ), 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'drawn' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), ), /* * Canvas Height */ 'canvas_height' => array( 'name' => 'canvas_height', 'type' => 'number', 'label' => esc_html__( 'Canvas Height (px)', 'ninja-forms' ), 'width' => 'one-half', 'group' => 'primary', 'value' => 150, 'help' => esc_html__( 'Height of the signature drawing area in pixels.', 'ninja-forms' ), 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'drawn' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), ), /* * Pen Color */ 'pen_color' => array( 'name' => 'pen_color', 'type' => 'color', 'label' => esc_html__( 'Pen Color', 'ninja-forms' ), 'width' => 'one-half', 'group' => 'primary', 'value' => '#000000', 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'drawn' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), ), /* * Background Color */ 'background_color' => array( 'name' => 'background_color', 'type' => 'color', 'label' => esc_html__( 'Background Color', 'ninja-forms' ), 'width' => 'one-half', 'group' => 'primary', 'value' => '#ffffff', 'deps' => array( 'settings' => array( array( 'name' => 'signature_method', 'value' => 'drawn' ), array( 'name' => 'signature_method', 'value' => 'both' ), ), 'match' => 'any', ), ), )); // 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' ) // );