Prefilling Your Form

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

Most websites allow you to pre-populate into your form by passing a value as a Query String.

To create a query string, we must first have a Form with a URL. For example:


https://formstack.io/73433

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.

https://formstack.io/73433?Contact.MailingCity=Kalamazoo

If we have multiple fields to prefill in this way, we must separate the fields with Ampersands (&):

https://formstack.io/73433?Contact.MailingCity=Kalamazoo&Contact.MailingState=MI

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!

 

 
To Learn more about Auto Generated Prefill links, please see this article

 


Was this article helpful?

https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete