GF_Field_Number

GF_Field_Number

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Number class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Number field is rendered when the form is displayed and how its value is handled during and after form submission. If a field is a Quantity field and Number is the chosen type of quantity, then this also handles the Quantity field.
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.

calculation_setting
Determines whether the 「Enable Calculation」 setting displays. This allows a calculation to be used for the number.

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.

number_format_setting
Determines whether the 「Number Format」 drop down displays. This setting allows the format of the number to be set from the choices of 「Currency」, 「9,999.99」, 「9.999,99」.

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.

range_setting
Determines whether the 「Range」 setting displays. This allows a minimum and maximum range to be set to ensure the number entered fits within the range.

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 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.

calculationFormula string
The formula used for the number field.

calculationRounding string
Specifies to how many decimal places the number should be rounded. This is available when enableCalculation is true, but is not available when the chosen format is 「Currency」 or if this is a Quantity field of the Number type.

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 displayed in the field. If this is not changed, it is the value submitted.

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.

enableCalculation boolean
Indicates whether the number field is a calculation.

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
This property is only available if the field is the Quantity field and of the Number type. This indicates the sub-type for the Quantity field. The value will be number, with the type property set to quantity.

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.

numberFormat string
The format for the number. The choices are 「currency」, 「decimal_comma」, 「decimal_dot」.

productField integer
This is only available if it is a Quantity field of the Number type. The id of the product field to which the Quantity is associated.

rangeMax integer
The maximum number the value may be. This is not available when enableCalculation is true.

rangeMin integer
The minimum number the value may be. This is not available when enableCalculation is true.

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

type string
The field type. This is set to number, unless this field is a Quantity field that is of the Number type. In that instance, the type will be set to quantity.

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

GF_Field_Option

GF_Field_Option

IntroductionSettings and PropertiesSettingsSource Code

Introduction
The GF_Field_Option class extends the GF_Field class, also known as the Field Object. This class is responsible for handling the Option field. Because Option fields are either a Drop Down, Radio Button, or Checkbox, this class only adds some settings and sets the title for the field in the editor. The rendering of the Option field is handled by the class associated with its sub-type. The field 「type」 property will be set to 「option」 and the field 「inputType」 property will be 「select」, 「radio」, or 「checkbox」.
For more details about rendering the Option field, check out the articles below:
Drop Down – GF_Field_Select class
Checkboxes – GF_Field_Checkbox class
Radio Buttons – GF_Field_Radio 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.

option_field_type_setting
Determines whether the 「Field Type」 drop down displays. This allows the type of Option field to be chosen. Current choices are 「Drop Down」, 「Checkboxes」, and 「Radio Buttons」.

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.

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

GF_Field_Page

GF_Field_Page

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Page class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Page field is rendered in the form editor. This only handles the section called 「PAGE BREAK」, not the 「START PAGING」 or 「END PAGING」 sections.
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 type$type = $field->type;
Settings
The following settings are available for the field:

conditional_logic_nextbutton_setting
Determines whether the 「Enable Next Button Conditional Logic」 section displays in the 「PAGE BREAK」 settings. This allows logic to be applied to control whether the 「Next」 button is displayed or hidden.

conditional_logic_page_setting
Determines whether the 「Enable Page Conditional Logic」 section displays in the 「PAGE BREAK」 settings. This allows logic to be applied to control whether the page is displayed or hidden.

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

next_button_setting
Determines whether the 「Next Button」 section displays in the 「PAGE BREAK」 settings. This section allows different text or a custom image to be used for the button.

previous_button_setting
Determines whether the 「Previous Button」 section displays in the 「PAGE BREAK」 settings. This section allows different text or a custom image to be used for the button.

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

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.

nextButton array
An array containing the the individual properties for the 「Next」 button.

type string
The type of 「button」 displayed. This may be 「text」 or 「image」.

text string
The text that displays on the button when it is not set to an image.

imageUrl string
The path to the image to be used for the button when the type is set to 「image」.

conditionalLogic array
The conditional logic rules that are to be applied to the 「Next」 button.
123456$next_button = array(                 'type'             => 'text',                 'text'             => 'Next Page',                 'imageUrl'         => '',                 'conditionalLogic' => array())

pageNumber integer
The page number of the current page.

previousButton array
An array containing the the individual properties for the 「Previous」 button.

type string
The type of 「button」 displayed. This may be 「text」 or 「image」.

text string
The text that displays on the button when it is not set to an image.

imageUrl string
The path to the image to be used for the button when the type is set to 「image」.
12345$previous_button = array(                     'type'     => 'image',                     'text'     => '',                     'imageUrl' => 'wp-content/uploads/2016/02/12493815_1539502326378360_2030773273496389484_o.jpg',)

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

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

GF_Field_Password

GF_Field_Password

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Password class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Password field is rendered when the form is displayed and how its value is handled during and after form submission. The Password field is not available in Gravity Forms by default. The Gravity Forms User Registration Add-on is one of the plugins which will add this field to the list of available fields.
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 password strength$password_strength_enabled = $field->passwordStrengthEnabled;
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.

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

input_placeholders_setting
For complex fields like the password, name, time, and address fields, this controls whether the 「Placeholders」 section will appear which lets you set placeholder text for the individual components of the field. When it is not a complex field, the 「placeholder_setting」 controls the display of this section.

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

password_strength_setting
Controls whether the 「Enable Password Strength」 section displays. This allows the minimum password strength to be set to Short, Bad, Good, or Strong.

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

sub_labels_setting
If a field has sub-labels, controls whether the setting to set them appears.

sub_label_placement_setting
If a field has sub-labels, controls whether the 「Sub-Label Placement」 setting appears.

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.

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.

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

id integer
The id of the input field.

label string
The label for the input.

customLabel string
The custom label for the input. When set, this is used in place of the label.

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

An example of the array output is as follows:
1234567891011121314$inputs = array(            array(              'id'          => '1',              'label'       => 'Enter Password',              'customLabel' => 'Password',              'placeholder' => 'Please enter your password'            ),            array(              'id'          => '1.2',              'label'       => 'Confirm Password',              'customLabel' => 'Confirmation',              'placeholder' => 'Please confirm your password'            ),          )

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.

labelPlacement string
The placement of the main field label 「Address」. The choices are top-aligned (top_label), left-aligned (left_label), right-aligned (right_label). To control the sub-label placement of the fields within the address group, use the 「subLabelPlacement」 property.

minPasswordStrength string
Indicates how strong the password should be. The possible values are short, bad, good, strong.

passwordStrengthEnabled boolean
Indicates whether the field displays the password strength indicator.

subLabelPlacement string
The placement of the labels for the fields (street, city, zip/postal code, etc.) within the address group. This setting controls all of the address pieces, they cannot be set individually. They may be aligned above or below the inputs. If this property is not set, the 「Sub-Label Placement」 setting on the Form Settings->Form Layout page is used. If no setting is specified, the default is above inputs.

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

Source Code
The source code is located in includes/fields/class-gf-field-password.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.

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_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_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_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_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.