Populate linked page with subscriber details.

Question:

Say I send an email to 'FirstName=John' and it contains a link to a page with a form he can fill out which will send me info. How would you make the form on THAT page pre-populate the name field with 'John'.

If an email is personalised to someone I'd rather not ask for their details again when they fill out a form on the page they're being linked to.

Any suggestions appreciated, ta.

Stig Stig, 1 year ago

Hi Rimfya,

Helpfully pre-filling form fields with subscriber data you already have, is definitely a nice gesture towards your subscribers!

The first step of populating the fields on the linked page is to add personalization tags to the link URL, in the query string.

E.g.

<a href="http://yoururl.com/example/?name=[fullname]&email=[email]&customfield=[customfield]">Your link text</a>

Next, the page you're linking to needs to grab those values from the query string, either using javascript or server side code, and add the values to the corresponding form fields.

If you're linking to a form on your own website, your programming language will provide a way of getting this data from the query string so you can insert it into the fields correctly.

If you're using Wufoo for example, they do the heavy lifting for you, by automatically populating the form with data you pass through the query string. There's even a 3rd party app that helps construct the URLs for pre-filling the Wufoo form fields.


The Campaign Monitor Blog – HTML email smarts to go with your good looks.
Rimfya, 1 year ago

Thanks Stig! Massive help.

For anyone else who Google's upon this, I found a Javascript that handles the situation perfectly. Thinking I should write a blog post of my own on it...

http://snipplr.com/view/43646/

Sign up for free.
Then send campaigns for as little as $9p/m

Create an account