How to Pre-Populate and Capture Data in Portal Forms

Important: This feature only works on Portal pages that do not require a login from the user.

 

1. Feature Overview

You can pre-populate Forms or Sign-Up Forms so the user can directly submit them and skip filling in different fields. This can be achieved by passing relevant data via query parameters. To know more about Portals, see Portal Management.

 

2. Query parameters

API Query parameters can be defined as the optional key-value pairs that appear after the question mark in the URL. They are extensions of the URL that are utilized to help determine specific content or action based on the data being delivered. Query parameters are appended to the end of the URL using a ‘?’. The question mark sign is used to separate path and query parameters.

If you want to add multiple query parameters, an ‘&’ sign is placed in between them to form what is known as a query string. It can feature various object types with distinct lengths such as arrays, strings, and numbers.

LeadSquared - Query parameters

 

3. Pre-populate data in Forms

To pass data to the Forms for the respective fields, we need to send the data in query parameters as key-value pairs. Here, the value is the actual value that must be populated in the Form field and the Key is the identifier of the field where the value must be populated. This key must adhere to a specific format –

This format has three components to it –

  1. Entity Prefix: A single letter representing the type of the entity.
    1. For Lead field – L
    2. For Activity field – A
    3. For Opportunity field – O
  2. Activity or Opportunity code if any (not applicable for lead field)
  3. ​​​​​​​​​​​​​​Schema Name: the schema name of the field you are trying to pre-fill

Some examples are –

  • For Lead fields: L_FirstName
  • For Activity fields: A_200_mx_Custom_1
Note: You can also have fields hidden that capture the query parameters and save.
LeadSquared - Pre-populating data in Forms

 

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

Was this Helpful?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments