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.

OperationHTTP VerbURL FormatAbility Requirements
CreatePOSThttps://pi.pardot.com/api/v5/objects/form-fieldsMarketing > Forms > Forms > Create ability
ReadGEThttps://pi.pardot.com/api/v5/objects/form-fields/<id>?<params>Marketing > Forms > Forms > View ability
QueryGEThttps://pi.pardot.com/api/v5/objects/form-fields?<params>Marketing > Forms > Forms > View ability
Add DependentPOSThttps://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addDependentMarketing > Forms > Forms > Create ability
Add ProgressivePOSThttps://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addProgressiveMarketing > Forms > Forms > Create ability
Add ValuePOSThttps://pi.pardot.com/api/v5/objects/form-fields/<id>/do/addValueMarketing > Forms > Forms > Create ability
Reorder Form Field ValuesPOSThttps://pi.pardot.com/api/v5/objects/form-fields/<id>/do/reorderFormFieldValuesMarketing > Forms > Forms > Create ability

These fields are required only for the create operation.

FieldTypeDescription
formIdIntegerID of the Form the Form Field belongs to.
prospectApiFieldIdStringThe 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".
typeEnumData type of the object. See Form Field Type Enum below.
dataFormatEnumDefault 'text'. Validation to apply to the input. See Form Field Data Format Enum below.
FieldTypeDescription
labelStringLabel of the form field.
descriptionStringUser-assigned description for the field. This field isn't queryable.
errorMessageStringError to display when the field isn't submitted correctly.
cssClassesStringCSS class to apply to the paragraph element that wraps the form input and label.
isRequiredBooleanSet to true to make populating this field required for form submission. Default false.
isAlwaysDisplayBooleanSet to true to always display this field, even if a value has already been collected for the prospect. Default false.
isMaintainInitialValueBooleanSet to true to maintain the prospect field value of the initial form submission. Subsequent submissions with new values will be ignored. Default false.
isDoNotPrefillBooleanSet to true to prevent prospect data from being pre-filled into the field. Default false.
dependentsDependents []A collection of form field dependents.
progressivesProgressives []A collection of form field progressives.
valuesValues[]A collection of form field values. These are only availble for form fields of type checkbox, radio button, multi-select, and dropdown fields.
FieldTypeDescription
idIntegerID of the form field.
sortOrderIntegerEach field in a given form will be assigned a number that indicates the display order.
hasDependentsBooleanSet to true if this field has Dependents.
hasProgressivesBooleanSet to true if this field has Progressives.
hasValuesBooleanSet to true if this field has Values.
createdByIdIntegerID of the user who created this object.
updatedByIdIntegerID of the user who updated this object.
createdAtDateTimeCreation time of the object.
updatedAtDateTimeLast update time of the object.
createdByUserUser object representing the user who created this object.
updatedByUserUser object representing the user who last updated this object.
Field NameData TypeDescription
values.valueStringA value for the form field.
Field NameData TypeDescription
values.labelStringThe label for a value on the form field.
values.listIdIntegerID of the list used for this value.
values.profileIdIntegerID of the profile used for this value.
values.sortOrderIntegerThe numeric value in which the value will be sorted on the form field.
Field NameData TypeDescription
progressives.prospectApiFieldIdStringID of the prospect API field for Progressive Profiling. Required.
Field NameData TypeDescription
dependents.formFieldIdIntegerThe ID of the form field to display when the dependent value is triggered.
dependents.valueStringThe 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.

ParameterDescription
idReturns any form field where id is equal to the given integer value.
idListReturns any form field where id is included in the given list of values.
idGreaterThanReturns any form field where id is greater than the specified value, non-inclusive.
idGreaterThanOrEqualToReturns any form field where id is greater than or equal to the specified value.
idLessThanReturns any form field where id is less than the specified value, non-inclusive.
idLessThanOrEqualToReturns any form field where id is less than or equal to the specified value.
formIdReturns any form field where formId is equal to the given integer value.
formIdListReturns any form field where formId is included in the given list of values.
formIdGreaterThanReturns any form field where formId is greater than the specified value, non-inclusive.
formIdGreaterThanOrEqualToReturns any form field where formId is greater than or equal to the specified value.
formIdLessThanReturns any form field where formId is less than the specified value, non-inclusive.
formIdLessThanOrEqualToReturns any form field where formId is less than or equal to the specified value.
createdAtReturns any form field where CreatedAt is equal to the given datetime value.
createdAtAfterReturns any form field where CreatedAt is after the given datetime value, non-inclusive.
createdAtAfterOrEqualToReturns any form field where CreatedAt is after or equal to the given datetime value.
createdAtBeforeReturns any form field where CreatedAt is before the given datetime value, non-inclusive.
createdAtBeforeOrEqualToReturns any form field where CreatedAt is before or equal to the given datetime value.
updatedAtReturns any form field where UpdatedAt is equal to the given datetime value.
updatedAtAfterReturns any form field where UpdatedAt is after the given datetime value, non-inclusive.
updatedAtAfterOrEqualToReturns any form field where UpdatedAt is after or equal to the given datetime value.
updatedAtBeforeReturns any form field where UpdatedAt is before the given datetime value, non-inclusive.
updatedAtBeforeOrEqualToReturns 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

  • text
  • radio button
  • checkbox
  • dropdown
  • textarea
  • hidden
  • date
  • multi-select
  • text
  • number
  • email
  • email with valid mail server
  • email not from isps and free email providers