How do I create a progressive form, whereby, a user is cookied and each time the user visits, the form displays differently?

  • 24 November 2015
  • 5 replies
  • 16 views

How do I create a progressive form, whereby a user is cookied and each time the user visits, the form displays differently, depending on the information that’s already been collected for them?

Example:

If Email, First Name, Last Name and Company have previously been collected, the next time a user comes through the form, First Name, Last Name and Company wouldn’t show. Only Email would show. Or, only Email and a new field (i.e., Title) would show.

The goal is to not to make users fill out the same information multiple times.

How would I do this?


5 replies

Hi,

To do this I would use Javascript to set cookies, then on page load check to see if the cookies exist and then use Jquery to show/hide the form fields you want based on the cookies set. The only issue you might find is that Unbounce uses fixed height sections so its difficult to make the form collapse automatically when certain fields are hidden, to get around this use Jquery to add a CSS override to the elements height properties. 

Hope that gives you a clue where to start

Cheers

Stuart.

Thanks so much - it does!

No probs, I have a nice little script that grabs url parameters and sets them as cookies if no cookie with that name has already been set. I use it to track lead journeys, but it could easily be modified to set the cookies, check for them, then execute the show/hide of the form fields.
Let me know if you want it. 🙂

Cheers

Stuart.

I’d love to check that script out, Stuart. That’d be really helpful.

Hi Stuart,
Yes! I’d love to use it. Thanks!

Reply