Creating a new product drop down that has two prices

Im trying to make a new product type that we will call Event

Idea: make a product called Event (figure 1), this will will be a normal product that will default to type = Drop Down. Under the edit choices button we will have the normal columns Label, Value and Price we will add a new column called Group Price (figure 2). In the form the filed we will render a Drop Down where a user can select an event and under it we will render a quantity for the regular price and then the group price (figure 3).

here is what ive got so far in the code any help would be appreciated!

<?php
class GF_Field_Event_Product extends GF_Field_Product{
  public $type = 'event_product';

  public function get_form_editor_field_title(){
    return esc_attr__('Event Product', 'gravityforms');
  }

  public function get_form_editor_button(){
    return array(
      'group' => 'custom_addon',
      'text' => $this->get_form_editor_field_title()
    );
  }

  public function get_form_editor_field_settings(){
    return array(
      'admin_label_setting',
      'css_class_setting',
      'default_value_setting',
      'description_setting',
      'label_setting',
      'prepopulate_field_setting',
      'product_field_type_setting'
    );
  }

  // Set default values
  public function get_field_input($form, $value = '', $entry = null){
    $this->label = __('Please choose an event', 'gravityforms');
    return parent::get_field_input($form, $value, $entry);
  }
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.