Formstack offers a number of different ways to prefill your form's fields. You can prefill your form's fields using static data that you define when building or publishing your form, or you can load data from existing Salesforce records dynamically into your form.
The following sections outline the various ways you can prefill your form.
Prefill using default values
You can define values to prefill any of the fields in your form using the 'Default Value' option within each field's options drawer. Simply click the arrow next to the field and enter the desired value in the 'Default Value' option provided.
Prefill by Query String
Next, we must determine which field we want to pre-populate. For this case, let's say we want to pre-populate the "Mailing City" field with the value "Kalamazoo".
Once we know that we want to populate Mailing City, we must get that field's "id", to find that value, simply right click + inspect it
In this case, our ID is Contact.MailingCity
With all this information, we're finally ready to create a prefill url.
If we have multiple fields to prefill in this way, we must separate the fields with Ampersands (&):
This can be done for any textbox, text area, single or multi-select picklist or checkbox.
Prefill and update existing Salesforce records (Dynamic Prefill)
In situations where you want to have your form populated with information from one or more Salesforce records, you'll want to use Formstack's Dynamic Prefill option. Dynamic Prefill allows you to define one or more records to be prefilled into your form and will update those Salesforce records as well upon submission.
To turn on Dynamic Prefill for your form, simply toggle the 'Dynamic Prefill' option in your form's publish options page:
Enabling Dynamic Prefill also allows you to define any related objects you'd like to have prefilled as well. Note that this option is only available to lookup fields on your primary object.
The approach that best suits your needs will depend entirely on how you want to tell Formstack which records to populate. The following options are available to you:
Prefill using Send By Email
To prefill a form using Send by Email, first select the option,
From here, you can select an individual record to send an Email to, or a pre-defined list view of contact records
Once you have selected your desired audience, you will be taken to an email template page.
From here, you can define:
1. The Email field that should be targeted
2. Any CCs or BCCs can be added here by adding the desired recipients email address.
3. a Subject
4. Your message to your users. To include the Prefilled link, simply include the "Hosted Form link" merge field if your form is not embedded on your website. if your form is embedded on your website use the Embedded Link
Of course, this option is not limited to contacts - any standard or custom object with an email address field can be prefilled using this method!
Prefill using Export Links
As with Send by Email, "Export Links" requires that you select an individual, or a predefined List View of users.
Unlike Save by Email, there is no further input required. Once you have selected your target audience, and clicked "Download CSV" a CSV file will be automatically downloaded. When you access this file, you'll find an outputted list of records from this list view, with prefill links for each entry: