Enhance Customer Experience on Your Form with this Formstack Hack

Written by Sarah Quezada on August 25, 2014

Posted in Form Hacks

Make it as easy as possible for your respondents to complete your form. One easy way to do that is to help fill out the form for them. It’s called Pre-Poulating Form Fields. Think of it as the online equivalent of politely taking the pen out of someone’s hand and doing the work for them.

But you’ve seen it. Isn’t it such a delightful surprise when you respond to a form and answers magically appear? It may take a few steps for you to set it up, but you’ll give your customers a little thrill and make it super easy for them to complete your form.

Simply put, “pre-populate” in this context means to populate a form with pre-determined data, either set or variable. It’s helpful if you want to pre-set a form with data so folks don’t have to fill out specific fields. Or you can retrieve data from a previously submitted form to pre-populate the current one.

Here’s how you can pre-populate a form in just a few simple steps:

STEP 1:

You’ll need to make some changes in your URL. We’ll use this example:

http://www.formstack.com/forms/?12345-ABCDEF

Change it to this:
http://www.formstack.com/forms/?form=12345&viewkey=ABCDEF

Note: You do not need to change the URL if you are using a URL alias.

STEP 2:

Add the data you want to pre-popluate into to your newly formatted URL:

http://www.formstack.com/forms/?form=12345&viewkey=ABCDEF&name-first=John&name-last=Doe&phone=555-5555

If you are using a URL alias change your URL should look like this:

http://www.formstack.com/forms/test-signup?name-first=John&name-last=Doe&phone=555-5555

Make sure you notice question mark before the first parameter. You can pre-populate name fields with: -prefix, -first, -middle, -initial, -last, -suffix (ex: name-first; name-last; etc.)  Here’s an example:

http://www.formstack.com/forms/?form=12345&viewkey=ABCDEF&name-first=John&name-last=Doe

Multiple options on a checkbox field can be populated by separating each option with a new line, which is encoded in the URL string as “%0A”.  This would look something like this:

http://www.formstack.com/forms/?form=12345&viewkey=ABCDEF&checkbox_field_name=option1_name%0Aoption2_name%0Aoption3_name

Make sure to change the “checkbox_field_name” with the actual field name. Same drill with “option1_name.”

Passing the Submission or Unique ID to another Form:

Start with the URL from your second Form that looks like this:

https://www.formstack.com/forms/?123456-ABCDEFGHIJ

And change it to be:

http://www.formstack.com/forms/?form=123456&viewkey=ABCDEFGHIJ&unique_id={$_submission_id}

Next, you will want to edit the second form Add a Short Answer field with a title of “Unique ID” or “unique_id.” You can to “Hide label on form” if you’d like but the Title must be one of these. Once this is complete, you can submit Form#1 and be redirected to Form#2 with the Submission ID parsed over to the second Form.

Redirecting From One Form To Another

If you want to pass data from one Formstack form to another Formstack form, we’ve got you covered.

STEP 1:
Build both of your forms.

STEP 2:
Create a Submit Action on your first form by going to Settings. Follow “Emails & Redirects” and “After the Form is Submitted.” Click on the green “+” sign to create a new Submit Action. Chose “Redirect to an External URL”.

The URL you want to redirect to will be the second form’s address with the field data already attached. Since we can’t know what individuals will enter, we have to use variables instead of set text. The URL will look something like this:

http://www.formstack.com/forms/?form=12345&viewkey=ABCDEF&name-first={$name-first}&name-last={$name-last}&phone={$phone}

The $name and $phone variables come from the field names, so whatever is typed into those fields on the first form passes on to the second form.

Make sure the receiving fields have exactly the same name as the sending fields for the data to pre-populate.

It may take a few extra steps to set up your forms to pre-populate. But your customers will be grateful for such a user-friendly form.

For more tips or to learn how to redirect from one form to another via email, check out this document.