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_Checkbox

GF_Field_Checkbox

IntroductionSettings and PropertiesSettingsPropertiesHooksSource Code

Introduction
The GF_Field_Checkbox class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Checkbox 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 Option field rendering when it is a checkbox.
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 checkbox 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 checkboxes. Without this section, the checkboxes 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.

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.

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.

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

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.

choices array
An array containing the the individual properties for each checkbox.

text string
The text that is displayed for the checkbox

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

isSelected boolean
Indicates whether the checkbox is selected/checked

price string
Used when the checkbox is an 「option」 field belonging to a product and contains the item price.
1234567891011121314151617181920$choices = array(             array(               'text'       => 'First Choice',               'value'      => 'one',               'isSelected' => false,               'price'      => '$5.00' //only populated if a product option 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 checkbox to be checked. This must match to a value for one of the items. This is only available when the checkbox 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.

enablePrice boolean
This property is used when the checkbox 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.

inputs array
An array containing the the individual properties for each checkbox.

id integer
The id of the input field.

label string
The label for the input.
1234567891011121314$inputs = array(            array(              'id'    => '1.1',              'label' => 'First Choice',            ),            array(              'id'    => '1.2',              'label' => 'Second Choice',            ),            array(              'id'    => '1.3',              'label' => 'Third Choice',            ),          );

inputType string
Used when the field has a sub-type. For instance, when the checkbox is a product option field, then the 「type」 is set to 「option」 and the 「inputType」 is set to 「checkbox」. 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.

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

type string
The field type. It is normally 「checkbox」, unless the checkbox is a product field option, then the type is set to 「option」, with 「inputType」 being set to 「checkbox」.

Hooks
The following hooks are located in GF_Field_Checkbox:

gform_field_choice_markup_pre_render
gform_field_choices

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

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

GF_Field_Hidden

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Hidden class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Hidden field and the Hidden Quantity field are 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 label
$label = $field->label;

Settings
The following settings are available for the field:

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

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.

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

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

defaultValue string
The default value to be set in the field. If this is not changed, it is the value submitted.

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 this is a hidden Quantity field. The inputType will be set to hidden, while the type will be set to quantity.

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

productField integer
This property is only available if this is a hidden Quantity field. The id of the product field to which the field is associated.

type string
The field type. This is set to 「hidden」, unless this is a hidden Quantity field, then the type will be quantity.

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

generic_map Field

generic_map Field

IntroductionParametersExampleValidationHelpersget_generic_map_fields()Uses

Introduction

The generic_map field type, part of the Settings API, allows the user to map custom keys to custom values, based on submission or other data. It differs from the Dynamic Field Map in that it allows custom options to be defined for the mapping/value field. It allows fields to be mapped to data other than form fields. 

Parameters

name stringRequired. Name of the field. Use it to retrieve saved data.label stringRequired. Field label. Will be displayed in the UI.type stringRequired. Field type. Must be set to dynamic_field_map for the Dynamic Field Map field.tooltip stringOptional. Defaults to blank (no tooltip). Displays a question mark icon and a tooltip next to the field label.limit intOptional. Defaults to no limit. Defines the number of fields that can be mapped by the user.field_types arrayOptional. Defaults to empty (no filtering). Array of form field types to be available as options when mapping to this field. Only form fields of the specified types will be included in the list of fieldsExample:   array( 『text』, 『name』 )exclude_field_types arrayOptional. Defaults to empty (no filtering). Array of form field types to be excluded when mapping to this field.Example: array( 『creditcard』 )

key_field arrayOptional. Defaults to empty. By default, the Generic Map field presents users with an open text field for the key field, allowing them to enter a custom value.The key_field property allows the Key field to be presented as a drop down list, where users can select from a set of predefined choices.key_field array properties:title stringOptional. Defaults to the word 「Key」. Title that is displayed as a header for the key field column.allow_custom boolOptional. Defaults to true. Allows users to enter a custom key that is not in the drop down list.placeholder stringOptional. Defaults to blank. Placeholder displayed in the custom field text input. Only applies when custom fields are enabled (i.e. allow_custom=true).allow_duplicates boolOptional. Defaults to false. Controls whether or not the same option in the key field can be mapped multiple times. Note: This only prevents options from being selected multiple times in the drop down. If custom keys are enabled, users won』t be prevented from typing the same custom option multiple times.choices arrayOptional. Defaults to empty. Defines the items/keys to be added to the key field drop down.Each item of the choices array has the following properties:tooltip stringRequired. Choice label that is displayed in the drop down.value stringOptional. Defaults to the Label text. Value that is savedchoices arrayOptional. Defaults to empty.Creates an option group in the drop down. The label property becomes the Option Group label and the choices defined here become the options under the new group.Each item of the inner choices array has the following properties:label stringRequired. Choice label that is displayed in the drop down.value stringOptional. Defaults to the Label text. Value that is saved.value_field arrayOptional. Defaults to empty. Configures the fields in the right column (value fields). When this array is empty or not specified, the value drop downs will default to displaying the form related data (i.e. form fields and entry data)Each item of the value_field array has the following properties:title stringOptional. Defaults to the word 「Value」. Title that is displayed as a header for the value field column.allow_custom boolOptional. Defaults to true. Allows users to enter a custom value that is not in the drop down list.placeholder stringOptional. Defaults to blank. Placeholder displayed in the custom field text input. Only applies when custom fields are enabled (i.e. allow_custom=true).

choices arrayOptional. Defaults to empty. Defines the items to be added to the value field drop down.Each item of the choices array has the following properties:label stringRequired. Choice label that is displayed in the drop down.value stringOptional. Defaults to the Label text. Value that is saved.choices arrayOptional. Defaults to empty. Creates an option group in the drop down. The Label property becomes the Option Group label and the choices defined here become the options under the new group.Each item of the inner choices array has the following properties:label stringRequired. Choice label that is displayed in the drop down.value stringOptional. Defaults to the Label text. Value that is saved.validation_callback (function)Optional. Defaults to nothing (no callback). Calls a function during validation allow for custom validation logic. The example in the existing documentation page is good.

Example

The following example shows how you can allow the user to define a number of custom keys and map them to custom values, which in this case is limited to twenty. We are also excluding the creditcard field from the drop downs which contain the form fields as choices.

12345678910111213141516171819array(    'title'  => esc_html__( 'This is the title for Section 1', 'sometextdomain' ),    'fields' => array(        array(            'name'      => 'metaData',            'type'      => 'generic_map',            'label'     => esc_html__( 'Example', 'sometextdomain' ),            'key_field' => array(                'title' => 'Key Field',                'type'  => 'text',            ),            'value_field' => array(                'title' => 'Value Field',                'text'  => 'text',            ),            'validation_callback' => array( $this, 'validate_custom_meta' ),        ),    ),),

Validation

In the above example a validation callback is also specified to ensure that the limit is not exceeded and that the custom keys don』t exceed the character limit defined by the third-party service.

123456789101112131415161718192021222324252627282930public function validate_custom_meta( $field ) {    //Number of keys is limited to 20 - interface should control this, validating just in case    //key names can only be max of 40 characters      $settings = $this->get_posted_settings();    $metaData = $settings['metaData'];      if ( empty( $metaData ) ) {        return;    }      //check the number of items in metadata array    $metaCount = count( $metaData );    if ( $metaCount > 20 ) {        $this->set_field_error( array( esc_html__( 'You may only have 20 custom keys.' ), 'sometextdomain' ) );          return;    }      //loop through metaData and check the key name length (custom_key)    foreach ( $metaData as $meta ) {        if ( empty( $meta['custom_key'] ) && ! empty( $meta['value'] ) ) {            $this->set_field_error( array( 'name' => 'metaData' ), esc_html__( "A field has been mapped to a custom key without a name. Please enter a name for the custom key, remove the metadata item, or return the corresponding drop down to 'Select a Field'.", 'sometextdomain' ) );            break;        } elseif ( strlen( $meta['custom_key'] ) > 40 ) {            $this->set_field_error( array( 'name' => 'metaData' ), sprintf( esc_html__( 'The name of custom key %s is too long. Please shorten this to 40 characters or less.', 'sometextdomain' ), $meta['custom_key'] ) );            break;        }    }}

Helpers

The following functions may come in helpful when interacting with the generic_map field type during feed processing.

get_generic_map_fields()

Retrieves the individual field_map fields from the meta property of the Feed Object for the supplied field name.

1$metaData = $this->get_generic_map_fields( $feed, 'metaData' );

$feed Feed Object
Feed object or settings array.

$field_name string
The name property of the generic_map field to retrieve the mapped fields for.

$form array
Form object. Defaults to empty array.

$entry array
Entry object. Defaults to empty array.

Uses

settings_generic_map

Setting Up the FreshBooks Add-On

Setting Up the FreshBooks Add-On

Pre-RequisitesSetup

Note: As of September 2016, FreshBooks has released a new version of their service. Currently, the Gravity Forms FreshBooks Add-On only works with the previous Freshbooks Classic version and will not work with their updated API.
Pre-Requisites

Download and install the add-on
A FreshBooks account

Please note that when using the FreshBooks Add-On you are limited to the capabilities of the FreshBooks account you have signed up for. Limitations include the number of clients you can create, so be sure to have a FreshBooks account that will be able to handle the level of integration you choose to implement.
Setup

Log into your WordPress admin dashboard.
On the left side navigation menu, hover over Forms and click on Settings.
From this page, click the FreshBooks tab.
Enter your Site Name and Authorization Token. If you need help finding this, refer to the Obtaining and Saving your FreshBooks API Credentials article.
Click Update Settings. If you』ve entered your account information correctly, you will be notified by green check marks beside each box. If you do not see green check marks, please double check this information and try again.

Once you have entered your API key, you』re ready to begin creating a feed for the FreshBooks Add-On.

Getting Started with the PayPal Payments Pro Add-On

Getting Started with the PayPal Payments Pro Add-On

RequirementsInstallationSetupFeed CreationHelpful Links

Sometimes getting started with the PayPal Payments Pro Add-On can be a bit daunting. For someone who has never used it, there can be some challenges in knowing where to begin and where to continue on to. In this article, we will outline steps that you will take when setting up the PayPal Payments Pro Add-On for Gravity Forms.
Requirements
Important: PayPal requires PCI compliance when using PayPal Payments Pro. For more information on PCI compliance, you will need to contact your web host.
The following articles outline the requirements for the PayPal Payments Pro Add-On:
PayPal Payments Pro Requirements
The Gravity Forms system requirements will also apply. They can be found here:
Gravity Forms Requirements
Installation
Before you can use this PayPal Payments Pro Add-On, you』ll need to install it. Installation is the same process as installing Gravity Forms or any other WordPress plugin from a zip file. If you need more information on how to do so, the following article will walk you through the process:
Installing Gravity Forms Add-Ons
Setup
Initial setup of the PayPal Payments Pro Add-On involves adding your PayPal Payment Pro credentials, as well as adding a credit card field to your form. More information on these can be found at the following:
Setting Up the PayPal Payments Pro Add-On
If you wish to use a PayPal Payments Pro Sandbox account, and need help creating one, this article will get you started:
Creating PayPal Payments Pro Sandbox Accounts
Feed Creation
To use the PayPal Payments Pro Add-On with your form, you will need to first create a feed for it. This is similar to other add-on feeds. The following article will explain the process:
Creating PayPal Payments Pro Feeds
Helpful Links
Credit Card Fields
Product Fields
Credit Card Field CSS Classes
Canceling a PayPal Payments Pro Subscription