Pre-populate with static data

You are here:
< Back

Usage

Forms have the ability to pre-populate the fields of a form from parameters that you put in the URL

For example, you have created a form that creates new “Applicant” in Salesforce once completed. You want, however to set the value of a Salesforce field called “Source” depending on which Job Board you distribute the form on. You want to avoid creating multiple forms for every single Job Board, but you want to just add the Source dynamically at the time of posting

To achieve this, go to the section Main Object Fields  in the URL Builder.

What you can do here, is select a field to which you want to assign a parameter (find the “Source”) fields and the URL will automatically update to include that field. The default parameter is [XXXX] so what you can do is at the time of posting the form on a Job Board, just substitute the [XXXX] portion with the name of the Job Board.

End result should look like this:

For Reed

https://simple-forms-developer-edition.eu9.force.com/site1/apex/formcomplete?id=a000O00000xQrpeQAC&Source__c=Reed

For CV Library

https://simple-forms-developer-edition.eu9.force.com/site1/apex/formcomplete?id=a000O00000xQrpeQAC&Source__c=CV%20Library

 

Note: 

  • You may have noticed that the CV Library example has “%20” between the two words. This is what’s called URL encoding – you won’t always need to do it, but it is a good practice in order to avoid some older browsers from only taking the wrong part of the lin
  • You can use this to help you format a URL correctly.