Prefilling a form with your supporters' details can lead to a significant increase in your conversion rates. In this article we'll show you how to build links that will automatically fill in form fields when your supporters click on the link.
Note: with this method of prefilling the form, any data put into the URL could be unwittingly forwarded on or shared by your supporter. So it's really important you don't use this to fill any fields with sensitive data. As a general rule, we would suggest that name and email address are OK as when forwarding an email to a friend you share this information anyway. You can read more about pre-population methods and security here.
<aside> š
Easily create a prefilling link for Mailchimp, Dotdigital and others with our toolkit here: https://toolkit.impact-stack.org/prepopulation-link
</aside>
When using URL parameters to prefill forms you simply add small bits of data to the URL that are then used to fill in the correct form fields. First, you need your base action URL. Go to right page on Impact Stack, click on āLiveā in the top right corner and copy the live url: https://action.example.org/action
You can then add parameters to this link:
#p:&Your URL could then look like this
https://action.example.org/action**#p**:first_name=Claire**&**last_name=Donner**&**[email protected]
This example URL uses three parameters:
first_name=Claire - Supporterās first name.last_name=Donner - Supporterās last name.[email protected] - Supporterās email address.When clicked on, it will add the supporterās name and email to the form.
<aside> šļø
Click on this link to see form prefilling in action: https://red.demo.impact-stack.org/demo-accessible-public-transport#p:first_name=Claire&last_name=Donner&[email protected]
</aside>
| Parameter | Description | Example |
|---|---|---|
first_name |
Supporterās first name. | first_name=Claire |
last_name |
Supporterās last name. | last_name=Donner |
salutation |
Supporterās salutation. Default options: family, mr, mrs, organisation. If you add your own options, make sure to use the correct key for the prefilling. | salutation=family |
title |
Supporterās title. Open text field. | title=Doctor |
email |
Supporterās email address. | [email protected] |
tel |
Supporterās phone number. If you choose to display a country flag, make sure to also add the phone number country code. Phone numbers are formatted and validated using this library: https://intl-tel-input.com/ | tel=+44123456 |
opt_in_email |
The email opt-in field can be set up as checkbox, inverted checkbox or radio buttons. | opt_in_email=opt-in |
opt_in_email=no-change |
||
opt_in_email=opt-out |
||
country |
Supporterās country. Select options, use the correct two digit country ISO code. | country=GB |
postcode |
Supporterās postcode. Open text field. Spaces need to be encoded with %20. |
postcode=WC2N5DU or postcode=WC2N%205DU |
comment |
Supporterās comment. Open text field. Spaces need to be encoded with %20. |
comment=prefillComment |
donation_amount |
Prefilling not implemented yet. | - |
donation_interval |
Prefilling not implemented yet. | - |