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.
Marketing > Forms > Forms > Create AND Marketing > Segmentation > Tags > Create
Fields
Required Editable Fields
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”.
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.
1HTTP/1.1 200 OK2Content-Type: application/json3{4 "id": 34,5 "createdAt": "2023-07-17T17:25:48-04:00",6 "form": {7 "campaignId": 1,8 "name": "Standard Form",9 "thankYouContent": "<p>Thank you for filling out the form. We will get back to you shortly.</p>"10},11 "formId": 1,12 "label": "First Name",13 "prospectApiFieldId": "firstName"14 "progressives":[15{16 "prospectApiFieldId": "email"17},18{19 "prospectApiFieldId": "lastName"20}21]22}
Form Field Query
Retrieving a collection of form fields follows the conventions described in Version 5 Overview.
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
Filtering Results
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.
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.
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.
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.