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>

Building your prefilling links

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:

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:

  1. first_name=Claire - Supporter’s first name.
  2. last_name=Donner - Supporter’s last name.
  3. [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>

Available parameters / form fields

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. -