Form Field Object
Use form fields to capture and store data related to leads, contacts, accounts, and other objects within the system. Learn more about forms in Salesforce Help.
The API to access the Form Field object follows the conventions described in Version 5 Overview.
Include the authentication header with every request. For information on how to authenticate, see Authentication.
Operation | HTTP Verb | URL Format | Ability Requirements |
---|---|---|---|
Create | POST | https://pi.pardot.com/api/v5/objects/form-fields | Marketing > Forms > Forms > Create |
Read | GET | https://pi.pardot.com/api/v5/objects/form-fields/<id>?<params> | Marketing > Forms > Forms > View |
Query | GET | https://pi.pardot.com/api/v5/objects/form-fields?<params> | Marketing > Forms > Forms > View |
Add Dependent | POST | https://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addDependent | Marketing > Forms > Forms > Create |
Add Progressive | POST | https://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addProgressive | Marketing > Forms > Forms > Create |
Add Value | POST | https://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addValue | Marketing > Forms > Forms > Create |
Reorder Form Field Values | POST | https://pi.pardot.com/api/v5/objects/form-fields/<id>/do/reorderFormFieldValues | Marketing > Forms > Forms > Create |
Add Tag | POST | https://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addTag | Marketing > Forms > Forms > Create AND Marketing > Segmentation > Tags > Create |
Remove Tag | POST | https://pi.pardot.com/api/v5/objects/form-fields/<id>/do/removeTag | Marketing > Forms > Forms > Create AND Marketing > Segmentation > Tags > Create |
These fields are required only for the create operation.
Field | Type | Description |
---|---|---|
formId | Integer | ID of the Form the Form Field belongs to. |
prospectApiFieldId | String | The name of the Account Engagement prospect field that the form field is mapped to. On standard fields the value is the name of the field. For example, "firstName". If mapping to a custom field, the value is the field name followed by __c. For example, the custom field "foodChoice" becomes "foodChoice__c". |
type | Enum | Data type of the object. See Form Field Type Enum below. |
dataFormat | Enum | Default 'text'. Validation to apply to the input. See Form Field Data Format Enum below. |
Field | Type | Description |
---|---|---|
label | String | Label of the form field. |
description | String | User-assigned description for the field. This field isn't queryable. |
errorMessage | String | Error to display when the field isn't submitted correctly. |
cssClasses | String | CSS class to apply to the paragraph element that wraps the form input and label. |
isRequired | Boolean | Set to true to make populating this field required for form submission. Default false. |
isAlwaysDisplay | Boolean | Set to true to always display this field, even if a value has already been collected for the prospect. Default false. |
isMaintainInitialValue | Boolean | Set to true to maintain the prospect field value of the initial form submission. Subsequent submissions with new values will be ignored. Default false. |
isDoNotPrefill | Boolean | Set to true to prevent prospect data from being pre-filled into the field. Default false. |
dependents | Dependents [] | A collection of form field dependents. |
progressives | Progressives [] | A collection of form field progressives. |
values | Values[] | A collection of form field values. These are only availble for form fields of type checkbox , radio button , multi-select , and dropdown fields. |
Field | Type | Description |
---|---|---|
id | Integer | ID of the form field. |
sortOrder | Integer | Each field in a given form will be assigned a number that indicates the display order. |
hasDependents | Boolean | Set to true if this field has Dependents. |
hasProgressives | Boolean | Set to true if this field has Progressives. |
hasValues | Boolean | Set to true if this field has Values. |
createdById | Integer | ID of the user who created this object. |
updatedById | Integer | ID of the user who updated this object. |
createdAt | DateTime | Creation time of the object. |
updatedAt | DateTime | Last update time of the object. |
createdBy | User | User object representing the user who created this object. |
updatedBy | User | User object representing the user who last updated this object. |
Field Name | Data Type | Description |
---|---|---|
values.value | String | A value for the form field. |
Field Name | Data Type | Description |
---|---|---|
values.label | String | The label for a value on the form field. |
values.listId | Integer | ID of the list used for this value. |
values.profileId | Integer | ID of the profile used for this value. |
values.sortOrder | Integer | The numeric value in which the value will be sorted on the form field. |
Field Name | Data Type | Description |
---|---|---|
progressives.prospectApiFieldId | String | ID of the prospect API field for Progressive Profiling. Required. |
Field Name | Data Type | Description |
---|---|---|
dependents.formFieldId | Integer | The ID of the form field to display when the dependent value is triggered. |
dependents.value | String | The value that triggers the dependent field to be displayed. |
Create a single form field following the conventions described in the Version 5 Overview.
Example request:
Example response:
201 Created
Retrieve a single form field object following the conventions described in the Version 5 Overview.
Example request:
Example response:
Retrieving a collection of form fields follows the conventions described in Version 5 Overview.
Example request:
Example response:
When executing a query, the following fields can be specified in the orderBy
parameter. See the conventions for query described in the Version 5 Overview.
id
formId
createdAt
updatedAt
When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.
Parameter | Description |
---|---|
id | Returns any form field where id is equal to the given integer value. |
idList | Returns any form field where id is included in the given list of values. |
idGreaterThan | Returns any form field where id is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any form field where id is greater than or equal to the specified value. |
idLessThan | Returns any form field where id is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any form field where id is less than or equal to the specified value. |
formId | Returns any form field where formId is equal to the given integer value. |
formIdList | Returns any form field where formId is included in the given list of values. |
formIdGreaterThan | Returns any form field where formId is greater than the specified value, non-inclusive. |
formIdGreaterThanOrEqualTo | Returns any form field where formId is greater than or equal to the specified value. |
formIdLessThan | Returns any form field where formId is less than the specified value, non-inclusive. |
formIdLessThanOrEqualTo | Returns any form field where formId is less than or equal to the specified value. |
createdAt | Returns any form field where CreatedAt is equal to the given datetime value. |
createdAtAfter | Returns any form field where CreatedAt is after the given datetime value, non-inclusive. |
createdAtAfterOrEqualTo | Returns any form field where CreatedAt is after or equal to the given datetime value. |
createdAtBefore | Returns any form field where CreatedAt is before the given datetime value, non-inclusive. |
createdAtBeforeOrEqualTo | Returns any form field where CreatedAt is before or equal to the given datetime value. |
updatedAt | Returns any form field where UpdatedAt is equal to the given datetime value. |
updatedAtAfter | Returns any form field where UpdatedAt is after the given datetime value, non-inclusive. |
updatedAtAfterOrEqualTo | Returns any form field where UpdatedAt is after or equal to the given datetime value. |
updatedAtBefore | Returns any form field where UpdatedAt is before the given datetime value, non-inclusive. |
updatedAtBeforeOrEqualTo | Returns any form field where UpdatedAt is before or equal to the given datetime value. |
Example request:
Example response:
Adds a dependent to the form field. Used to display other fields on the form based on the value of this field.
Example: Conditionally display a State field when a prospect indicates their Country is United States.
Tip: Use conditional display to lead a prospect through the process of filling out a longer form with multiple fields, especially when certain fields are related or only relevant if a certain value is chosen.
Example request
Example Response
Adds a progressive profiling field to a form field. This form field will only be displayed if the prospect already has data in the prospect api field of this progressive.
Example: The first time a prospect visits, only ask for their first name, last name, and email. Then use progressive profiling to ask for their company and phone number on the next form.
Use progressive profiling to collect more data over a series of multiple form submissions. By spreading out your information gathering over multiple interactions, the prospect is more likely to convert each time and you still get the data you need.
Example request
Example Response
Add a possible value for the form field. These values can only be added when the form field is of type checkbox
, radio button
, multi-select
, or dropdown
.
Example Request
Example Response
Reorder a list of form field values for a given form field. When this action is taken the new order of values can be seen on the form field.
Example Request
Example Response
Adds a Tag to the Form Field object, which creates a TaggedObject.
Example Request
Example Response
Remove a tag from a Form Field object. When you remove a tag, the associated TaggedObject record is deleted.
Example Request
Example Response
Returns code 204 no content
.
- text
- radio button
- checkbox
- dropdown
- textarea
- hidden
- date
- multi-select
- text
- number
- email with valid mail server
- email not from isps and free email providers