GF_Field_SingleShipping

GF_Field_SingleShipping

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_SingleShipping class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Single Method Shipping field is rendered when the form is displayed and how its value is handled during and after form submission.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the admin label
$admin_label = $field->adminLabel;

Settings
The following settings are available for the field:

base_price_setting
Determines whether the 「Price」 section displays. This allows a base price to be specified for shipping.

Properties
Below is a listing of the properties inherited from the parent class and ones specific to the field.

adminLabel string
The label to be used on admin pages instead of the label, useful for fields with long labels.

allowsPrepopulate boolean
Determines if the field values can be dynamically populated. Default is false.

basePrice string
The shipping price. The value includes the formatting characters.

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

description string
The field description.

descriptionPlacement string
The placement of the field description. The description may be placed 「above」 or 「below」 the field inputs. If the placement is not specified, then the description placement setting for the Form Layout is used.

formId integer
The form ID.

id integer
The field ID.

inputName string
The parameter name used when dynamically populating the field.

inputType string
Used when the field has a sub-type. This is set to singleshipping. The type property will be set to shipping.

label string
The field label that will be displayed on the form and on the admin pages.

type string
The field type. This is set to shipping. The inputType property is set to singleshipping.

Source Code
The source code is located in includes/fields/class-gf-field-singleshipping.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_SingleProduct

GF_Field_SingleProduct

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_SingleProduct class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Single Product field is rendered when the form is displayed and how its value is handled during and after form submission. Because this is a product field, the 「type」 property will be set to 「product」 and the 「inputType」 property to 「singleproduct」.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the admin label
$admin_label = $field->adminLabel;

Settings
The following settings are available for the field:

base_price_setting
Determines whether the 「Price」 section displays. This allows a base price to be specified for the product.

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

disable_quantity_setting
Determines whether the 「Disable quantity field」 checkbox appears. This allows the quantity to be removed from the field. A default value of 1 will be used, unless a separate Quantity field is added.

duplicate_setting
Controls whether the 「No Duplicates」 setting displays within the 「Rules」 section. This controls whether the same value may exist more than once in the database. The 「Rules」 setting must be active for this to display.

error_message_setting
Controls whether the 「Custom Validation Message」 setting which allows a custom message to be used appears.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

rules_setting
Controls whether the 「Rules」 settings section displays. The 「Required」 option shows when this is active.

Properties
Below is a listing of the properties inherited from the parent class, and the properties unique to the field.

adminLabel string
The label to be used on admin pages instead of the label, useful for fields with long labels.

allowsPrepopulate boolean
Determines if the field values can be dynamically populated. Default is false.

basePrice string
The price of the product. The value includes the formatting characters.

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

description string
The field description.

descriptionPlacement string
The placement of the field description. The description may be placed 「above」 or 「below」 the field inputs. If the placement is not specified, then the description placement setting for the Form Layout is used.

disableQuantity boolean
Indicates whether the Quantity field is active.

errorMessage string
The custom error message to be displayed if the field fails validation.

formId integer
The form ID.

id integer
The field ID.

inputs array
An array containing the the individual properties for each element of the single product field.

id integer
The id of the input field.

label string
The label for the input.

name string
The name of the parameter used for the input when dynamically populating the field.

An example of the array output is as follows:
$inputs = array(
array(
'id' => '1.1',
'label' => 'Product Name',
'name' => 'param_product'
),
array(
'id' => '1.2',
'label' => 'Price',
'name' => 'param_price'
),
array(
'id' => '1.3',
'label' => 'Quantity',
'name' => 'param_qty'
),
)

inputType string
Specifies the type of Product field being used. For instance, when the field is for a product, the 「type」 is set to product and the 「inputType」 is set to singleproduct. When the field is created, the type is initially set using the 「type」 property. If 「inputType」 is not empty, then the 「inputType」 is used to create the field instead.

isRequired boolean
Marking the field as required will prevent the form from being submitted if the user does not enter a value. Default is false.

label string
The field label that will be displayed on the form and on the admin pages.

noDuplicates boolean
Determines if the value entered by the user may already exist in the database.

type string
The field type, which in this case is product. The specific type of product field is in the 「inputType」 property.

Source Code
The source code is located in includes/fields/class-gf-field-singleproduct.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Shipping

GF_Field_Shipping

IntroductionSettings and PropertiesSettingsSource Code

Introduction
The GF_Field_Shipping class extends the GF_Field class, also known as the Field Object. This class is responsible for handling the Shipping field. Because Shipping fields are either a Single Method, Drop Down, or Radio Button, this class only adds some settings and sets the title for the field in the editor. The rendering of the Shipping field is handled by the class associated with its sub-type. The field 「type」 property will be set to 「shipping」 and the field 「inputType」 property will be 「singleshipping」, 「select」, or 「radio」.
For more details about rendering the Option field, check out the articles below:
Drop Down – GF_Field_Select class
Radio Buttons – GF_Field_Radio class
Single Method – GF_Field_Singleshipping class
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the admin label
$admin_label = $field->adminLabel;

Settings
The following settings are available for the field:

admin_label_setting
Controls whether the 「Admin Field Label」 setting appears.

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.

description_setting
Controls whether the 「Description」 setting appears. This allows a description for the field to be displayed.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

prepopulate_field_setting
Controls whether the 「Allow field to be populated dynamically」 setting appears.

shipping_field_type_setting
Controls whether the 「Field Type」 section displays. This allows the Shipping field to be set to the types: Single Method, Drop Down, Radio Button.

Source Code
The source code is located in includes/fields/class-gf-field-shipping.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Select

GF_Field_Select

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Select class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Drop Down field is rendered when the form is displayed and how its value is handled during and after form submission. This class also handles the rendering of the Product, Product Option, Quantity, Shipping fields when they are a drop down.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
12345//get the field$field = GFFormsModel::get_field( $form, 1 ); //get the admin label$admin_label = $field->adminLabel;
Settings
The following settings are available for the field:

admin_label_setting
Controls whether the 「Admin Field Label」 setting appears.

choices_setting
Determines whether the 「Choices」 setting displays. This section allows you to create different drop down selections and set associated values to each one. It also allows you to choose from a pre-defined set of data that may be used to create the items in the drop down. Without this section, the drop down selections are limited to 「First Choice」, 「Second Choice」 and 「Third Choice」 and may not be changed in the editor.

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.

default_value_setting
Controls whether the 「Default Values」 section displays. This allows a value to be set for the field.

description_setting
Controls whether the 「Description」 setting appears. This allows a description for the field to be displayed.

duplicate_setting
Controls whether the 「No Duplicates」 setting displays within the 「Rules」 section. This controls whether the same value may exist more than once in the database. The 「Rules」 setting must be active for this to display.

enable_enhanced_ui_setting
Determines whether the 「Enable enhanced user interface」 setting displays. This setting allows the Chosen jquery script to be used to add search capability to the drop down.

error_message_setting
Controls whether the 「Custom Validation Message」 setting which allows a custom message to be used appears.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

placeholder_setting
Controls whether the 「Placeholders」 section appears. This allows placeholder text to display for the field.

prepopulate_field_setting
Controls whether the 「Allow field to be populated dynamically」 setting appears.

rules_setting
Controls whether the 「Rules」 settings section displays. The 「Required」 option shows when this is active.

size_setting
Controls whether the 「Field Size」 setting displays. This controls the size of the input field for fields to which it applies. The sizes are 「small」, 「medium」, and 「large」.

visibility_setting
Controls whether the 「Visibility」 setting displays. The controls whether the option of visibility being for 「Everyone」 or 「Admin Only」 can be set.

Properties
Below is a listing of the properties inherited from the parent class and ones unique to the field.

adminLabel string
The label to be used on admin pages instead of the label, useful for fields with long labels.

adminOnly boolean
Determines whether the field is visible to the user submitting the form, or only visible in the admin.

allowsPrepopulate boolean
Determines if the field values can be dynamically populated. Default is false.

choices array
An array containing the the individual properties for each item in the drop down.

text string
The text that is displayed for the drop down.

value string
The value that is used for the drop down when the form is submitted.

isSelected boolean
Indicates whether the drop down item is selected

price string
Used when the drop down is a Product, Product Option or Shiping field and contains the item price.

Below is an example of the output:
1234567891011121314151617181920$choices = array(             array(               'text'       => 'First Choice',               'value'      => 'one',               'isSelected' => false,               'price'      => '$5.00' //only populated if a product, product option, shipping field             ),             array(               'text'       => 'Second Choice',               'value'      => 'two',               'isSelected' => true,               'price'      => ''             ),             array(               'text'       => 'Third Choice',               'value'      => 'three',               'isSelected' => false,               'price'      => ''             ),           )

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

defaultValue string
The default value to be chosen in the drop down field. This must match to a value for one of the items.

description string
The field description.

descriptionPlacement string
The placement of the field description. The description may be placed 「above」 or 「below」 the field inputs. If the placement is not specified, then the description placement setting for the Form Layout is used.

enableChoiceValue boolean
Indicates whether the 「show values」 option within the 「Choices」 section of the editor is checked.

enableEnhancedUI boolean
Indicates whether the option to use the Chosen jquery script to add search capability to the drop down is checked.

enablePrice boolean
This property is used when the drop down is a Product, Product Option, or Shipping field and will be set to true. If not associated with one of those fields, it is false.

errorMessage string
The custom error message to be displayed if the field fails validation.

formId integer
The form ID.

id integer
The field ID.

inputName string
The parameter name used when dynamically populating the field.

inputType string
Used when the field has a sub-type. For instance, when the drop down is a Product, Product Option, Quantity, or Shipping field, then the 「type」 is set to product when a Product field, option when a Product Option field, quantity when a Quantity field, shipping when a Shipping field. The 「inputType」 is set to select. When the field is created, the type is initially set using the 「type」 property. If 「inputType」 is not empty, then the 「inputType」 is used to create the field instead.

isRequired boolean
Marking the field as required will prevent the form from being submitted if the user does not enter a value. Default is false.

label string
The field label that will be displayed on the form and on the admin pages.

noDuplicates boolean
Determines if the value entered by the user may already exist in the database.

placeholder string
Placeholder text to give the user a hint on how to fill out the field. This is not submitted with the form. This will be displayed as the first item in the drop down.

productField integer
The id of the product field to which the drop down is associated. This is used when the drop down is an Option or Quantity field associated with a product.

size string
Controls the width of the input field. The choices are 「small」, 「medium」, and 「large」.

type string
The field type. It is normally select, unless the drop down is a Product, Product Option, Quantity or Shipping field. The type is set to product when a Product Field, option when a Product Option field, quantity when a Quantity, shipping when a Shipping field. The 「inputType」 is set to select.

Source Code
The source code is located in includes/fields/class-gf-field-select.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Section

GF_Field_Section

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Section class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Section field is rendered when the form is displayed and how its value is handled during and after form submission.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the description
$description = $field->description;

Settings
The following settings are available for the field:

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.

description_setting
Controls whether the 「Description」 setting appears. This allows a description for the field to be displayed.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

visibility_setting
Controls whether the 「Visibility」 setting displays. The controls whether the option of visibility being for 「Everyone」 or 「Admin Only」 can be set.

Properties
Below is a listing of the properties inherited from the parent class and ones specific to the field.

adminOnly boolean
Determines whether the field is visible to the user submitting the form, or only visible in the admin.

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

description string
The field description.

displayOnly boolean
Indicates the field is only displayed and its contents are not submitted with the form/saved with the entry. This is set to true.

formId integer
The form ID.

id integer
The field ID.

label string
The field label that will be displayed on the form and on the admin pages.

type string
The field type. This is set to 「section」.

Source Code
The source code is located in includes/fields/class-gf-field-section.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Radio

GF_Field_Radio

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction

The GF_Field_Radio class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Radio Button field is rendered when the form is displayed and how its value is handled during and after form submission. This class also handles the Product, Product Option, and Shipping fields rendering when the field is a radio button.

Settings and Properties

Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.

Properties contain the values specified by the settings and generally are part of the Field Object.

The properties may be retrieved by accessing the Field Object as follows:

//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the admin label
$admin_label = $field->adminLabel;

Settings

The following settings are available for the field:

admin_label_settingControls whether the 「Admin Field Label」 setting appears.choices_settingDetermines whether the 「Choices」 setting displays. This section allows you to create different radio button selections and set associated values to each one. It also allows you to choose from a pre-defined set of data that may be used to create the radio buttons. Without this section, the radio button selections are limited to 「First Choice」, 「Second Choice」 and 「Third Choice」 and may not be changed in the editor. conditional_logic_field_settingControls whether the 「Enable Conditional Logic」 setting appears. css_class_settingControls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field. description_settingControls whether the 「Description」 setting appears. This allows a description for the field to be displayed. duplicate_settingControls whether the 「No Duplicates」 setting displays within the 「Rules」 section. This controls whether the same value may exist more than once in the database. The 「Rules」 setting must be active for this to display. error_message_settingControls whether the 「Custom Validation Message」 setting which allows a custom message to be used appears. label_settingControls whether the 「Field Label」 setting which allows the label to be changed appears. other_choice_settingDetermines whether the 「Enable 「other」 choice」 setting displays. When checked, this creates a final text input as Other and allows the user to enter their own text. prepopulate_field_settingControls whether the 「Allow field to be populated dynamically」 setting appears. rules_settingControls whether the 「Rules」 settings section displays. The 「Required」 option shows when this is active. visibility_settingControls whether the 「Visibility」 setting displays. The controls whether the option of visibility being for 「Everyone」 or 「Admin Only」 can be set.

Properties
Below is a listing of the properties inherited from the parent class and ones specific to the field.

adminLabel string
The label to be used on admin pages instead of the label, useful for fields with long labels.

adminOnly boolean
Determines whether the field is visible to the user submitting the form, or only visible in the admin.

allowsPrepopulate boolean
Determines if the field values can be dynamically populated. Default is false.

choices array
An array containing the the individual properties for each radio button item.

text string
The text that is displayed

value string
The value that is used for the radio button when the form is submitted.

isSelected boolean
Indicates whether the radio button item is selected

isOtherChoice boolean
Indicates the radio button item is the 「Other」 choice.

price string
Used when the radio button is a Product, Product Option, or Shipping Field and contains the item price.

Below is what the output would look like:
$choices = array(
array(
'text' => 'First Choice',
'value' => 'one',
'isSelected' => false,
'price' => '$5.00' //only populated if a product, product option or shipping field
),
array(
'text' => 'Second Choice',
'value' => 'two',
'isSelected' => true,
'price' => ''
),
array(
'text' => 'Third Choice',
'value' => 'three',
'isSelected' => false,
'price' => ''
),
array(
'text' => 'Other',
'value' => 'gf_other_choice',
'isSelected' => false,
'isOtherChoice' => true
)
)

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

defaultValue string
The radio button to be selected. This must match to a value for one of the items. This is only available when the radio button is a product option field.

description string
The field description.

descriptionPlacement string
The placement of the field description. The description may be placed 「above」 or 「below」 the field inputs. If the placement is not specified, then the description placement setting for the Form Layout is used.

enableChoiceValue boolean
Indicates whether the 「show values」 option within the 「Choices」 section of the editor is checked.

enableOtherChoice boolean
Indicates whether the 「Enable 「other」 choice」 option is checked in the editor.

enablePrice boolean
This property is used when the radio button is a product option field and will be set to true. If not associated with a product, then it is false.

errorMessage string
The custom error message to be displayed if the field fails validation.

formId integer
The form ID.

id integer
The field ID.

inputName string
The parameter name used when dynamically populating the field.

inputType string
Used when the field has a sub-type. For instance, when the radio button is a Product, Product Option, or Shipping field, then the 「type」 is set to product when a Product field, option when a Product Option and shipping when a Shipping field. The 「inputType」 is set to radio. When the field is created, the type is initially set using the 「type」 property. If 「inputType」 is not empty, then the 「inputType」 property is used to create the field instead.

isRequired boolean
Marking the field as required will prevent the form from being submitted if the user does not enter a value. Default is false.

label string
The field label that will be displayed on the form and on the admin pages.

noDuplicates boolean
Determines if the value entered by the user may already exist in the database.

productField integer
The id of the product field to which the radio button is associated. This is used when the radio button is an 「option」 associated with a product.

type string
The field type. It is normally 「radio」, unless the radio buttons are a Product, Product Option, or Shipping field. The type is set to product when a Product Field, option when a Product Option field, and shipping when a Shipping field. The 「inputType」 is set to radio.

Source Code

The source code is located in includes/fields/class-gf-field-radio.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Quantity

GF_Field_Quantity

IntroductionSettings and PropertiesSettingsSource Code

Introduction
The GF_Field_Quantity class extends the GF_Field class, also known as the Field Object. This class is responsible for handling the Quantity field. Because Quantity fields are either a Number, Drop Down or Hidden field, this class only adds some settings and sets the title for the field in the editor. The rendering of the Quantity field is handled by the class associated with its sub-type. The field 「type」 property will be set to 「quantity」 and the field 「inputType」 property will be 「number」, 「select」, or 「hidden」.
For more details about rendering the Quantity field, check out the articles below for the specific type of Quantity field:
Number – GF_Field_Number class
Drop Down – GF_Field_Select class
Hidden Product – GF_Field_Hiddenproduct class
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the admin label
$admin_label = $field->adminLabel;

Settings
The following settings are available for the field:

admin_label_setting
Controls whether the 「Admin Field Label」 setting appears.

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.

default_value_setting
Controls whether the 「Default Values」 section displays. This allows a value to be set for the field.

description_setting
Controls whether the 「Description」 setting appears. This allows a description for the field to be displayed.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

placeholder_setting
Controls whether the 「Placeholders」 section appears. This allows placeholder text to display for the field.

prepopulate_field_setting
Controls whether the 「Allow field to be populated dynamically」 setting appears.

product_field_setting
Determines whether the 「Product Field Mapping」 section displays. This allows you to select to which product field the Option is associated.

quantity_field_type_setting
Determines whether the 「Field Type」 section displays. This allows the Quantity field to be set to a specific type: Number, Drop Down, Hidden.

Source Code
The source code is located in includes/fields/class-gf-field-quantity.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Product

GF_Field_Product

IntroductionSettings and PropertiesSettingsSource Code

Introduction
The GF_Field_Product class extends the GF_Field class, also known as the Field Object. This class is responsible for handling the Product field. Because Product fields are either a Single Product, Drop Down, Radio Button, User Defined Price, Hidden or Calculation, this class only adds some settings and sets the title for the field in the editor. The rendering of the Product field is handled by the class associated with its sub-type. The field 「type」 property will be set to product. Depending on the product field chosen, the field 「inputType」 property will be *singleproduct**, 「select」, 「radio」, 「price」, 「hiddenproduct」, or 「calculation」.
For more details about rendering the Option field, check out the articles below:
Calculation – GF_Field_Calculation class
Drop Down – GF_Field_Select class
Hidden Product – GF_Field_Hiddenproduct class
Radio Buttons – GF_Field_Radio class
Single Product – GF_Field_Singleproduct class
User Defined Price – GF_Field_Price class
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
//get the field
$field = GFFormsModel::get_field( $form, 1 );

//get the admin label
$admin_label = $field->adminLabel;

Settings
The following settings are available for the field:

admin_label_setting
Controls whether the 「Admin Field Label」 setting appears.

css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.

default_value_setting
Controls whether the 「Default Values」 section displays. This allows a value to be set for the field.

description_setting
Controls whether the 「Description」 setting appears. This allows a description for the field to be displayed.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

prepopulate_field_setting
Controls whether the 「Allow field to be populated dynamically」 setting appears.

product_field_type_setting
Determines whether the 「Field Type」 section displays. This allows the product field to be set to a specific type: Single Product, Drop Down, Radio Buttons, User Defined Price, Hidden, or Calculation.

Source Code
The source code is located in includes/fields/class-gf-field-product.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Price

GF_Field_Price

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Price class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Product field is rendered when it is a 「User Defined Price」 when the form is displayed and how its value is handled during and after form submission.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
12345//get the field$field = GFFormsModel::get_field( $form, 1 ); //get the admin label$admin_label = $field->adminLabel;
Settings
The following settings are available for the field:

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

duplicate_setting
Controls whether the 「No Duplicates」 setting displays within the 「Rules」 section. This controls whether the same value may exist more than once in the database. The 「Rules」 setting must be active for this to display.

error_message_setting
Controls whether the 「Custom Validation Message」 setting which allows a custom message to be used appears.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

placeholder_setting
Controls whether the 「Placeholders」 section appears. This allows placeholder text to display for the field.

rules_setting
Controls whether the 「Rules」 settings section displays. The 「Required」 option shows when this is active.

size_setting
Controls whether the 「Field Size」 setting displays. This controls the size of the input field for fields to which it applies. The sizes are 「small」, 「medium」, and 「large」.

Properties
Below is a listing of the properties inherited from the parent class and ones specific to the field.

adminLabel string
The label to be used on admin pages instead of the label, useful for fields with long labels.

allowsPrepopulate boolean
Determines if the field values can be dynamically populated. Default is false.

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

description string
The field description.

descriptionPlacement string
The placement of the field description. The description may be placed 「above」 or 「below」 the field inputs. If the placement is not specified, then the description placement setting for the Form Layout is used.

errorMessage string
The custom error message to be displayed if the field fails validation.

formId integer
The form ID.

id integer
The field ID.

inputName string
The parameter name used when dynamically populating the field.

inputType string
The sub-type of a field. For instance, when the field is a Product field, the 「type」 is set to product and the 「inputType」 is set to price. When the field is created, the type is initially set using the 「type」 property. If 「inputType」 is not empty, then the 「inputType」 is used to create the field instead.

isRequired boolean
Marking the field as required will prevent the form from being submitted if the user does not enter a value. Default is false.

label string
The field label that will be displayed on the form and on the admin pages.

noDuplicates boolean
Determines if the value entered by the user may already exist in the database.

placeholder string
Placeholder text to give the user a hint on how to fill out the field. This is not submitted with the form.

size string
Controls the width of the input field. The choices are 「small」, 「medium」, and 「large」.

type string
The field type. The type is set to 「product」. The 「inputType」 is set to 「price」.

Source Code
The source code is located in includes/fields/class-gf-field-price.php in the Gravity Forms folder of your sites plugins directory.

GF_Field_Phone

GF_Field_Phone

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Phone class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Phone field is rendered when the form is displayed and how its value is handled during and after form submission.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
12345//get the field$field = GFFormsModel::get_field( $form, 1 ); //get the admin label$admin_label = $field->adminLabel;
Settings
The following settings are available for the field:

admin_label_setting
Controls whether the 「Admin Field Label」 setting appears.

conditional_logic_field_setting
Controls whether the 「Enable Conditional Logic」 setting appears.

css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.

default_value_setting
Controls whether the 「Default Values」 section displays. This allows a value to be set for the field.

description_setting
Controls whether the 「Description」 setting appears. This allows a description for the field to be displayed.

duplicate_setting
Controls whether the 「No Duplicates」 setting displays within the 「Rules」 section. This controls whether the same value may exist more than once in the database. The 「Rules」 setting must be active for this to display.

error_message_setting
Controls whether the 「Custom Validation Message」 setting which allows a custom message to be used appears.

label_setting
Controls whether the 「Field Label」 setting which allows the label to be changed appears.

phone_format_setting
Controls whether the 「Phone Format」 section displays. The section allows the phone format to be set to domestic US/Canada style or international.

placeholder_setting
Controls whether the 「Placeholders」 section appears. This allows placeholder text to display for the field.

prepopulate_field_setting
Controls whether the 「Allow field to be populated dynamically」 setting appears.

rules_setting
Controls whether the 「Rules」 settings section displays. The 「Required」 option shows when this is active.

size_setting
Controls whether the 「Field Size」 setting displays. This controls the size of the input field for fields to which it applies. The sizes are 「small」, 「medium」, and 「large」.

visibility_setting
Controls whether the 「Visibility」 setting displays. The controls whether the option of visibility being for 「Everyone」 or 「Admin Only」 can be set.

Properties
Below is a listing of the properties inherited from the parent class, and the properties unique to the field.

adminLabel string
The label to be used on admin pages instead of the label, useful for fields with long labels.

adminOnly boolean
Determines whether the field is visible to the user submitting the form, or only visible in the admin.

allowsPrepopulate boolean
Determines if the field values can be dynamically populated. Default is false.

conditionalLogic array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

description string
The field description.

cssClass string
The custom CSS class or classes to be added to the input tag for the field.

defaultValue string
The default value displayed in the field. This will be submitted with the form if not changed.

descriptionPlacement string
The placement of the field description. The description may be placed 「above」 or 「below」 the field inputs. If the placement is not specified, then the description placement setting for the Form Layout is used.

errorMessage string
The custom error message to be displayed if the field fails validation.

formId integer
The form ID.

id integer
The field ID.

inputName string
The parameter name used when dynamically populating the field.

isRequired boolean
Marking the field as required will prevent the form from being submitted if the user does not enter a value. Default is false.

label string
The field label that will be displayed on the form and on the admin pages.

noDuplicates boolean
Determines if the value entered by the user may already exist in the database.

phoneFormat string
The format for the phone number. The possible values are 「standard」 or 「international」.

placeholder string
Placeholder text to give the user a hint on how to fill out the field. This is not submitted with the form.

size string
Controls the width of the input field. The choices are 「small」, 「medium」, and 「large」.

type string
The field type, which in this case is phone.

Source Code
The source code is located in includes/fields/class-gf-field-phone.php in the Gravity Forms folder of your sites plugins directory.