Skip to content Skip to main navigation Skip to footer

Pre-Fill Form Fields

With Opero Forms, you can pre-fill form fields by creating a formula field on the base object that you would like to relate to your form responses. The formula field combines the unique form url with the “relatedTo” parameter and record Id, plus parameters for each field that you would like to pre-fill with data. Please see specific steps below.

Configuration Steps

  1. Create a form with a few form fields. 
  2. Create a custom formula (text) field on the base object.
  3. Copy the form URL from the Form URL field.
  4. Create the formula by pasting the form URL into the formula field editor. Add the relatedTo parameter. Place this in quotes. Then add the base object record Id merge field. The format should be as follows: “[form url]?relatedTo=” + Id. For example:
+ Id  
  1. Then, add a form field parameter in quotes, e.g. “&field1”, and add the API name of whatever field you want to merge, e.g. + Primary_Contact_First_Name__c. For example:
+ Id  
+ "&field1=" 
+ Primary_Contact_First_Name__c 
+ "&field2="
+  Primary_Contact_Last_Name__c 
+ "&field3="
+  Primary_Contact_Email__c
  1. Add the formula field to the page layout.
  2. From the record page, when you view the formula field you will see the URL contains the form URL, relatedTo param populated with the record Id, and form field parameters with the assigned field values from the record. For example:
  1. When you click the formula field url, it will open the web form with fields pre-filled with values from the related record:

After the user clicks the “Submit” button on the form, a form response record is created. To view form responses, go to the Form Field related list on the Form record, and you will see the related record Id stored in the Related to ID field. You can use this Related to Id field to then update the related record using a flow or Apex.

Related Articles:

Formula Field That Relates Form Responses to a Specific Record

Related Articles

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *