Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Paragraph Text', 'ninja-forms');
     $this->_settings['default']['type'] = 'textarea';
     $this->_settings['placeholder']['type'] = 'textarea';
 }
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Shipping', 'ninja-forms');
     add_filter('ninja-forms-field-settings-groups', array($this, 'add_setting_group'));
     add_filter('ninja_forms_merge_tag_value_shipping', array($this, 'merge_tag_value'), 10, 2);
 }
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Checkbox', 'ninja-forms');
     $this->_settings['label_pos']['value'] = 'right';
     add_filter('ninja_forms_custom_columns', array($this, 'custom_columns'), 10, 2);
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     /*
      * Setup 'type' options for the opt-in field.
      */
     $this->_settings['type']['options'] = array(array('label' => __('Single', 'ninja-forms'), 'value' => 'single'), array('label' => __('Multiple', 'ninja-forms'), 'value' => 'multiple'));
     /*
      * Add a refresh extra for the groups fieldset.
      */
     $this->_settings['fieldset']['label'] = __('Lists', 'ninja-forms') . ' <a href="#"><small>' . __('refresh', 'ninja-forms') . '</small></a>';
     $this->_settings['fieldset']['deps'] = array('type' => 'multiple');
     /*
      * Hide the 'type' and 'fieldset' ('groups') settings until they are ready for use.
      */
     $this->_settings['type']['group'] = '';
     $this->_settings['fieldset']['group'] = '';
     /*
      * Single Opt-In Default. Multiple Opt-In will use the groups fieldset.
      */
     $this->_settings['default']['type'] = 'toggle';
     $this->_settings['default']['value'] = 0;
     $this->_settings['default']['label'] = __('Opt-In by default', 'ninja-forms');
     $this->_settings['default']['group'] = 'primary';
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $this->_settings['classes']['group'] = 'primary';
     $this->_nicename = __('Divider', 'ninja-forms');
     add_filter('nf_sub_hidden_field_types', array($this, 'hide_field_type'));
     unset($this->_settings['classes']['settings']['wrapper ']);
 }
 /**
  * Validate
  *
  * @param $field
  * @param $data
  * @return array $errors
  */
 public function validate($field, $data)
 {
     $errors = parent::validate($field, $data);
     if (isset($field['spam_answer']) && isset($field['value']) && $field['spam_answer'] != $field['value']) {
         $errors[] = __('Incorrect Answer', 'ninja-forms');
     }
     return $errors;
 }
Example #7
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Paragraph Text', 'ninja-forms');
     $this->_settings['default']['type'] = 'textarea';
     $this->_settings['placeholder']['type'] = 'textarea';
     add_filter('ninja_forms_merge_tag_value_' . $this->_name, array($this, 'filter_merge_tag_value'), 10, 2);
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Product', 'ninja-forms');
     $this->_settings['product_price']['width'] = 'full';
     add_filter('ninja_forms_merge_tag_value_product', array($this, 'merge_tag_value'), 10, 2);
     add_filter('ninja_forms_localize_field_' . $this->_name, array($this, 'filter_required_setting'));
     add_filter('ninja_forms_localize_field_' . $this->_name . '_preview', array($this, 'filter_required_setting_preview'));
 }
Example #9
0
 public function __construct()
 {
     parent::__construct();
     $this->_settings['label']['width'] = 'full';
     $this->_settings['default']['group'] = 'primary';
     $this->_settings['default']['type'] = 'rte';
     $this->_settings['default']['use_merge_tags'] = array('include' => array('calcs'));
     $this->_nicename = __('HTML', 'ninja-forms');
 }
Example #10
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Single Checkbox', 'ninja-forms');
     $this->_settings['label_pos']['value'] = 'right';
     add_filter('ninja_forms_custom_columns', array($this, 'custom_columns'), 10, 2);
     add_filter('ninja_forms_merge_tag_value_' . $this->_name, array($this, 'filter_merge_tag_value'), 10, 2);
     add_filter('ninja_forms_merge_tag_calc_value_' . $this->_name, array($this, 'filter_merge_tag_value_calc'), 10, 2);
 }
Example #11
0
 public function __construct()
 {
     parent::__construct();
     $this->_settings['default']['group'] = 'primary';
     $this->_settings['default']['label'] = __('Number of Stars', 'ninja-forms');
     $this->_settings['default']['width'] = 'one-half';
     $this->_settings['default']['use_merge_tags'] = FALSE;
     $this->_settings['default']['value'] = 5;
     $this->_nicename = __('Star Rating', 'ninja-forms');
 }
Example #12
0
 public function __construct()
 {
     parent::__construct();
     $this->_settings['label']['width'] = 'full';
     $this->_settings['default']['group'] = 'primary';
     $this->_settings['default']['type'] = 'rte';
     $this->_settings['default']['use_merge_tags'] = array('include' => array('calcs'), 'exclude' => array('form', 'fields'));
     $this->_nicename = __('HTML', 'ninja-forms');
     add_filter('nf_sub_hidden_field_types', array($this, 'hide_field_type'));
 }
Example #13
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Checkbox', 'ninja-forms');
     $this->_settings['label_pos']['value'] = 'right';
 }
Example #14
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Textbox', 'ninja-forms');
 }
Example #15
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Product', 'ninja-forms');
     add_filter('ninja_forms_merge_tag_value_product', array($this, 'merge_tag_value'), 10, 2);
 }
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Password', 'ninja-forms');
 }
Example #17
0
 public function get_parent_type()
 {
     return parent::get_type();
 }
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Credit Card Expiration', 'ninja-forms');
     add_filter('nf_sub_hidden_field_types', array($this, 'hide_field_type'));
 }
Example #19
0
 public function __construct()
 {
     parent::__construct();
     $this->_nicename = __('Single Line Text', 'ninja-forms');
 }