Introduction
Do you want to pre-populate form fields with information pulled from another form? Not only does this assure accuracy between forms but it also saves your visitors time, allowing for higher conversions. In this tutorial, we’ll show you how to pass through information from one form to another by using pre-populated query strings.
Creating your forms
We’ll start by creating two separate forms. If you need any help in creating forms, please see this documentation.
Creating the homepage form
First, we’ll create the first form and add the Name and Email field to the form.
For now, click Save. We’ll be coming back to this form in another step.
Creating an additional form
Create an additional form with the Name and Email form fields but also add any additional fields to collect more detailed information.
In the Advanced Options section of the Name field.
Copy and paste this field key into your Default field.
{query_var key="name-field"}
When you add in the Email field, you’ll repeat this step in the Advanced Options section for the Email form field. Copy and paste this into the Default field.
{query_var key="email-address"}
Setting up the URL Redirect on form submission
Now it’s time to pull it all together. Edit the homepage form you created in the first step and go to the Settings » Confirmation section.
Change the Confirmation Type to Go To URL (Redirect) and in the Confirmation Redirect URL field, copy and paste this URL.
http://my-example-site.com/quote/?email-address={field_id="2"}&name-field={field_id="1"}
With that URL above, there will be some things you’ll need to change. Such as:
my-example-site.com
– this needs to be changed to match your site’s domain name.quote
– this needs to be changed to match the page name you’ve added your more detailed form to.{field_id="2"}
– this will need to be changed to match the field ID number from your first form for the Email field.{field_id="1"}
– this will need to be changed to match the field ID number from your first form for the Name field.
If you need help finding your specific field ID numbers, take a look at this tutorial.
Once you’ve added that to your Confirmation Redirect URL, click Save on the form.
Now when users see the homepage form, they can fill in their name and email address and when they click the Submit button, the page will redirect to another form that will automatically pre-populate the Name and Email Address fields with the information collected from the form on your homepage.
And that’s all you need to use a query string to pre-populate your form fields. Would you like to see what other fields you can use this with? Take a look at our documentation on How to Enable Dynamic Field Population.