In order to make it as easy as possible for your contacts to fill in your form, it can be useful to automatically populate certain information. By adding query strings to the URL of a form, you can ensure that your contact's data is immediately visible when they want to fill in a form. This can include information such as name and (email) address. This also works for hidden form fields.
Sections of this help article:
Considerations
- Contacts can still edit the content of the automatically filled form fields if desired.
- Each query string added to a URL will be different, depending on the form fields you want to automatically populate.
- It is not possible to use this functionality on landing pages. Landing pages do not support query strings.
How does it work?
Adding a query string to a URL is fortunately a quick and simple process. All you need to know are the following two things:
- Which field you want to automatically populate
- The personalisation tag associated with this field
Once you have decided which field(s) you want to automatically populate on the form, and which personalisation tags you need for this, you have all the necessary information to create your query string.
After adding the query string to the URL of your form, existing contacts who land on this form will see their own information pre-filled in the corresponding fields.
How to automatically populate form fields
This solution works for form fields only for the following input types:
- Text input
- Textarea
- Date
- Date and time
- Hidden Field
Step 1: Identify form fields and their corresponding personalisation tags
You can find all standard and custom fields in your account on the 'Fields' page. To find this page, navigate to 'Contacts'. Then click on 'Fields'.
On the 'Fields' page, you will find a list of all your standard and custom fields. Each field has a corresponding personalisation tag. Copy the personalisation tag for each field you want to automatically populate and paste it into your notes. This ensures that you have this information readily available when you need it in the following steps.
To give an example, we will pre-fill the following form fields with the corresponding personalization tags:
- First name (%FIRSTNAME%)
- Email (%EMAIL%)
Step 2: Create the query string
The next step is to create a query string. Before you proceed, we would like to provide some additional information about query strings:
A query string is essentially extra information that you place at the end of a URL. This information is used to perform a specific action on the web page. When referring to an action, in this case, it involves pre-filling form fields with the information of existing contacts.
To create a query string, you can use the following format:
?fieldname=%PERSONALIZATION-TAG%
If you want to pre-fill multiple form fields automatically, you can use the following format (pay attention to the "&" between the two field names)
?fieldname=%PERSONALIZATION-TAG%&fieldname=%PERSONALIZATION-TAG%
Curious about how to apply this in practice? Here we have already filled in a query string with the intention of automatically pre-filling the form fields "First name" and "Email":
?firstname=%FIRSTNAME%&email=%EMAIL%
Step 3: Add the query string to the form URL
Once you have created your query string, you can add it to the end of the URL of your form. Here are a few points to keep in mind:
- This functionality only works with the 'Inline form' style. For more information on different form styles, you can refer here.
- After adding the query string to the URL of your form, you can use this URL as you wish. There is no change to the process of sharing the URL
To retrieve the URL of your inline form, you can follow these steps:
- From the navigation bar in your MailBlue account, click on 'Website'.
- For the form in which you want to automatically pre-fill the form fields, click on 'Edit'.
- Once you are in the form designer, click on 'Integrate' in the upper right corner of your screen.
- Now you will see some options to integrate your form. Here, click on the 'Link' tab.
The URL of the form will look something like this:
https://youracaccountname.activehosted.com/f/213
- Finally, add the desired query string to the end of this URL.
Application
Once the query string has been added to the URL of your form, you can use it as you would normally use your form. The following articles provide more information about forms in general.
How do I place a form on my website?
How do I add a form to my Facebook page?
How do I add a form to an email?
How do I connect my MailBlue form to Phoenix?