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

GF_Field_Text

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Text class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Single Line Text 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.

input_mask_setting
Controls whether the 「Input Mask」 setting displays which allows you to select a visual guide for entering the data from a drop down list.

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

maxlen_setting
Controls whether the 「Maximum Characters」 setting displays. This controls how many characters are allowed to be entered into the field. This is currently used by the text, textarea, post content, and post excerpt fields.

password_field_setting
Controls whether the 「Enable Password Input」 setting displays which allows the text field to be used as a password field with the data replaced with asterisks as the user types.

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

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

enablePasswordInput boolean
Indicates whether the field displays as a password input field with the text displayed as asterisks instead of being visible.

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.

maxLength string
The number of characters that the text is allowed to contain.

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, which in this case is text.

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

GF_Field_Textarea

GF_Field_Textarea

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Textarea class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Paragraph Text (textarea) 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:

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_textarea_setting
Controls whether the 「Default Value」 setting displays. This allows default text to be shown in the textarea. If this text is not changed, it will be submitted with the form.

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.

maxlen_setting
Controls whether the 「Maximum Characters」 setting displays. This controls how many characters are allowed to be entered into the field. This is currently used by the text, textarea, post content, and post excerpt fields.

placeholder_textarea_setting
Controls whether the 「Placeholder」 setting displays. This allows a hint to be provided as to what should be entered into the field. This text is not submitted with the form. If the Rich Text Editor is being used, this setting cannot be used.

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

rich_text_editor_setting
Controls whether the 「Use the Rich Text Editor」 setting displays. If checked, the rich text editor provides an interface which allows advanced editing/formatting capabilities to 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」.

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

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.

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 「Time」. 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 time group, use the 「subLabelPlacement」 property.

maxLength string
The number of characters that the textarea is allowed to contain.

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

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

useRichTextEditor boolean – Indicates whether the field uses the rich text editor interface.

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

GF_Field_Time

GF_Field_Time

IntroductionSettings and PropertiesSettingsPropertiesSource Code

Introduction
The GF_Field_Time class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Time 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:

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_input_values_setting
For complex fields like the name, time, address fields, this controls whether the 「Default Values」 section will appear which lets you set values for the individual components of the field. When it is not a complex field, the 「default_value_setting」 controls the display of this section.

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.

input_placeholders_setting
For complex fields like the 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.

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.

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.

time_format_setting
Controls whether the 「Time Format」 setting displays.

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.

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. The parameter will be formatted as HH:MM AM/PM, ex: 12:30 PM.

inputs array
An array containing the the individual properties for each element of the time 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. For the website field, the text 「http://」 is displayed.

defaultValue string
The default value to be displayed in the input field.

$inputs = array(
array(
'id' => '1.1',
'label' => 'HH',
'name' => '',
'customLabel' => 'Hours (HH)',
'placeholder' => 'Enter the hours',
'defaultValue' => '10',
),
array(
'id' => '1.2',
'label' => 'MM',
'name' => '',
'customLabel' => 'Minutes (MM)',
'placeholder' => 'Enter the minutes',
'defaultValue' => '30',

),
array(
'id' => '1.3',
'label' => 'AM/PM',
'name' => '',
'customLabel' => 'am/pm',
'defaultValue' => 'PM'
),
);

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 「Time」. 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 time group, use the 「subLabelPlacement」 property.

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

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

subLabelPlacement string
The placement of the labels for the fields (hours, minutes, am/pm) within the address group. This setting controls all of the time 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.

timeFormat string
Determines whether the time is displayed in 12 hour or 24 hour format. The value is 「12」 or 「24」.

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

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

Sending Form Notifications Using Postmark

Sending Form Notifications Using Postmark

Pre-RequisitesConfiguring Notifications

A common issue that most WordPress users see is a failure to send emails from their site. This is usually caused by their web host blocking the emails or a shared IP on the web server being flagged for spam. By using the Postmark Add-On to send form notifications, that issue can be eliminated, since the notifications will be sent using a dedicated email service, rather than relying on the web server. Here』s how to set it up.

Pre-Requisites

Setup the Postmark Add-On

Configuring Notifications

Now that you』ve set up your initial settings within the Postmark Add-On, it』s time to configure your form notifications to send using Postmark.

Access an existing form notification or create a new notification by going to your form settings and clicking on Notifications.Under Email Service, select the Postmark option.When using Postmark, you』ll only be able to send from specific email addresses that are pre-configured within Postmark. Within the From Email dropdown, select the email address that you want to use as the sender for the notification.Continue setting up your notification. For more information, see our article on configuring notifications in Gravity Forms.Save your settings.

You』re all set! Your form notifications will now use Postmark to send the messages.

In addition to the standard functionality of sending notifications, you can also take advantage of Postmark』s additional features within the Postmark Add-On such as email tracking and statistics within your Postmark account. For more information, take a look at our article on email tracking in Postmark.

Sending Form Notifications Using SendGrid

Sending Form Notifications Using SendGrid

Pre-RequisitesConfiguring Notifications

In most cases, it』s best practice to use an email-specific service for sending emails from your WordPress site instead of relying on your web server. That』s where the SendGrid Add-On for Gravity Forms comes in. With the SendGrid Add-On, you』ll be able to easily send all of your form notifications directly through SendGrid with just a few clicks.

Pre-Requisites

Make sure you have completed the steps in this article to ensure you have setup the SendGrid Add-On.

Configuring Notifications

Now that you』ve set up your initial settings within the SendGrid Add-On, it』s time to configure your form notifications to send using SendGrid.

Access an existing form notification or create a new notification by going to your form settings and clicking on Notifications.Within your notification, you should see a setting labeled Email Service. Within this setting, select the SendGrid option.Continue setting up your notification like usual. For more information, see our article on configuring notifications in Gravity Forms.Save your settings.

That』s all there is to it! Your form notifications are now configured to use the SendGrid email service!

Form Object

Form Object

IntroductionUsagePropertiesBasic PropertiesPost RelatedForm SubmissionAdvanced PropertiesForm JSON

Introduction
The Form object is the main object in Gravity Forms. It contains all properties of a particular form (i.e. form title, fields, notification, scheduling, etc…). This object is available to most of the Gravity Forms hooks.
It is formatted as an associative array (i.e. $form[『title』] retrieves the form title).
Usage
12$form['title']                  //returns the form title$form['fields'][0]['type'];     //returns the type of the first field of the form

Properties
Basic Properties

id integer
The form Id.

title string
The form title

description string
The form description

labelPlacement string
Determines if the field labels are displayed on top of the fields (top_label), besides the fields and aligned to the left (left_label) or besides the fields and aligned to the right (right_label)
Possible values: top_label, left_label, right_label

descriptionPlacement string
Determines if the field description is displayed above the field input (i.e. immediately after the field label) or below the field input.
Possible values: above, below
Note: This setting is only available when labelPlacement is set to 「top_label」. When labelPlacement is not 「top_label」, this setting will always be set to 「below」.

Field Object array
List of all fields that belong to the form

Post Related

useCurrentUserAsAuthor bool
For forms with Post fields, this determines if the post should be created using the current logged in user as the author. 1 to use the current user, 0 otherwise.

postAuthor integer
When useCurrentUserAsAuthor is set to 0, this property contains the user Id that will be used as the Post author.

postCategory integer
Form forms with Post fields, but without a Post Category field, this property determines the default category that the post will be associated with when created.

postContentTemplate string
Template to be used when creating the post content. Field variables (i.e. {Name:3} ) can be added to the template to insert user submitted values into the post content. Only applicable when postContentTemplateEnabled is true

postContentTemplateEnabled bool
Determines if the post template functionality is enabled. When enabled, the post content will be created based on the template specified by postContentTemplate.

postFormat string
For forms with Post fields, determines the format that the Post should be created with.
Possible values: Will vary depending on the formats supported by the current theme.

postStatus string
For forms with Post fields, determines the status that the Post should be created with.
Possible values: draft, pending, publish

postTitleTemplate string
Template to be used when creating the post title. Field variables (i.e. {Name:3} ) can be added to the template to insert user submitted values into the post title. Only applicable when postTitleTemplateEnabled is true

postTitleTemplateEnabled bool
Determines if the post title template functionality is enabled. When enabled, the post title will be created based on the template specified by postTitleTemplate.

Form Submission

confirmation array
Contains the form confirmation settings such as confirmation text or redirect URL

notifications Notifications Object
An associative array containing the properties for all the email notifications which exist for a form.

Advanced Properties

Button array
Contains the form button settings such as the button text or image button source.

cssClass string
Custom CSS class. This class will be added to the

tag.

enableAnimation bool
When enabled, conditional logic hide/show operation will be performed with a jQuery slide animation. Only applicable to forms with conditional logic.

enableHoneypot bool
Specifies if the form has the Honeypot spam-protection feature

limitEntries bool
Specifies if this form has a limit on the number of submissions. 1 if the form limits submissions, 0 otherwise.

limitEntriesCount integer
When limitEntries is set to 1, this property specifies the number of submissions allowed.

limitEntriesMessage string
Message that will be displayed when the maximum number of submissions have been reached

scheduleForm bool
Specifies if this form is scheduled to be displayed only during a certain configured date/time

scheduleStart string
Date in the format (mm/dd/yyyy) that the form will become active/visible

scheduleStartHour integer
Hour (1 to 12) that the form will become active/visible

scheduleStartMinute integer
Minute that the form will become active/visible

scheduleStartAmpm string
「am」 or 「pm」. Applies to scheduleStartHour

scheduleEnd string
Date in the format (mm/dd/yyyy) that the form will become inactive/hidden

scheduleEndHour integer
Hour (1 to 12) that the form will become inactive/hidden

scheduleEndMinute integer
Minute that the form will become inactive/hidden

scheduleEndAmpm string
「am」 or 「pm」. Applies to scheduleEndHour

scheduleMessage string
Message to be displayed when form is no longer available

schedulePendingMessage string
Message to be displayed when form is not yet available

Form JSON
This example shows how a form array would look when formatted as JSON for use by the Gravity Forms CLI Add-On.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071{    "title": "My test form",    "description": "",    "labelPlacement": "top_label",    "descriptionPlacement": "below",    "button": {        "type": "text",        "text": "Submit",        "imageUrl": ""    },    "fields": [{        "type": "text",        "label": "My New Label",        "defaultValue": "Just testing",        "id": "1",        "visibility": "visible",        "formId": "14",        "pageNumber": 1    }, {        "type": "select",        "label": "My Dropdown",        "choices": [{            "text": "Choice 1",            "value": "one"        }, {            "text": "Choice 2",            "value": "two"        }],        "id": "2",        "visibility": "visible",        "formId": "14",        "pageNumber": 1,        "isRequired": false    }],    "version": "2.3-rc-5",    "id": "14",    "useCurrentUserAsAuthor": true,    "postContentTemplateEnabled": false,    "postTitleTemplateEnabled": false,    "postTitleTemplate": "",    "postContentTemplate": "",    "lastPageButton": null,    "pagination": null,    "firstPageCssClass": null,    "is_active": "1",    "date_created": "2018-04-12 16:51:40",    "is_trash": "0",    "notifications": {        "5acf8e9cf2b40": {            "id": "5acf8e9cf2b40",            "to": "{admin_email}",            "name": "Admin Notification",            "event": "form_submission",            "toType": "email",            "subject": "New submission from {form_title}",            "message": "{all_fields}"        }    },    "confirmations": {        "5acf8e9cf310a": {            "id": "5acf8e9cf310a",            "name": "Default Confirmation",            "isDefault": true,            "type": "message",            "message": "Thanks for contacting us! We will get in touch with you shortly.",            "url": "",            "pageId": "",            "queryString": ""        }    }}