/**
  * Constructs and initializes payment methods field.
  *
  * @param $properties
  */
 public function __construct($properties = array())
 {
     parent::__construct($properties);
     /*
      * The `inputType` of the payment methods field was in the past set to `checkbox`
      * this results in a `GF_Field_Checkbox` field with additional inputs, but we what
      * need is a payment methods field without additional inputs.
      *
      * @see https://github.com/wp-premium/gravityforms/blob/1.9.19/includes/fields/class-gf-fields.php#L60-L86
      */
     $this->inputs = null;
     // Actions
     if (!has_action('gform_editor_js_set_default_values', array(__CLASS__, 'editor_js_set_default_values'))) {
         add_action('gform_editor_js_set_default_values', array(__CLASS__, 'editor_js_set_default_values'));
     }
     // Admin
     if (is_admin()) {
         $this->inputType = 'checkbox';
     }
     // Choices
     $this->enableChoiceValue = true;
     if (isset($this->formId)) {
         $this->set_choices($this->formId);
     }
 }
 /**
  * Constructs and initializes issuers field.
  *
  * @param $properties
  */
 public function __construct($properties = array())
 {
     parent::__construct($properties);
     // Actions
     if (!has_action('gform_editor_js_set_default_values', array(__CLASS__, 'editor_js_set_default_values'))) {
         add_action('gform_editor_js_set_default_values', array(__CLASS__, 'editor_js_set_default_values'));
     }
     if (!isset($this->formId) && defined('DOING_AJAX') && DOING_AJAX && filter_has_var(INPUT_POST, 'form_id') && filter_has_var(INPUT_POST, 'action') && 'rg_add_field' === filter_input(INPUT_POST, 'action')) {
         $this->formId = filter_input(INPUT_POST, 'form_id', FILTER_SANITIZE_NUMBER_INT);
     }
     // Choices
     if (isset($this->formId)) {
         $this->set_choices($this->formId);
     }
 }