How to Easily Pass Data Between WordPress Forms

Save your users time and effort, increase form conversion with this simple technique

How many times have you filled out a form and had to repeat information that you’d already entered? It’s a pain in the neck, isn’t it? Ever walked away from a form like that in frustration? I have. Many of your users probably have too.

How many times have you created a form knowing that a user was going to have to do the same? Making a user fill in information repeatedly on your WordPress forms is a hassle that you don’t want to put them through.

Users shouldn’t have to fill in form information twice. Fortunately, there’s an easy fix.

Using Ninja Forms, there’s a system already in place that allows you to pass data between WordPress forms, from one WordPress form to another. You can even adapt that method to autopopulate form fields with things like referring source and a logged in user’s name and other info. Let’s look at how!

An easy way to pass data between WordPress forms

Taking information that a user has entered into one form and moving it to a different form is easy. This way users can move directly from one form to another for any reason, and have pertinent information follow them. No more asking twice for basic information like name or email, or anything else for that matter!

Step One: Set up your destination form to receive data

Open the form you want to send information into (Form B), and select the specific field you want to pre-populate. You’re looking for the Advanced setting for that field. In the Default Value setting of that field, enter {querystring:key}. Key can be any other designation that you choose, just keep it consistent through the next steps. Alternatively, you can click the merge tag icon to the right of the Default Value field and select querystring from the menu under Other to save yourself some typing.

In the example below we’re setting up an email field to be pre-populated with the user’s email address that they’ve filled out previously in another form.

Step Two: Set up a redirect to the destination form

In the form that you’ll initially be collecting information from the user in, add a redirect action. This will move the user from the first form (Form A) to the destination form (Form B) once they’ve entered their info and click submit.

In the redirect action, append a querystring containing the Key value that you used in the destination form from Step One above. Set the value of the querystring equal to the merge tag of the field that you’re wanting to pass data from. This is all you need to pass data between WordPress forms!

populate a form from another form; redirect action

User information will now be passed from one form to the other for the field we followed Step One and Step Two for above!

The effect of the steps above is that a user will enter their email address once and only once into the first form, Form A. They submit the form and are redirected to Form B, where the email address they entered has been pre-populated for them. You can now pass data between WordPress forms anytime you want to!

If you’re new to or just struggling to wrap your head around querystrings, here’s a more detailed post on the subject.

Here’s what it looks like:

populate a form gif

Bonus: Pre-populate fields with the referring source or a logged in user’s info… even if they’ve never filled out another form for you ever!

Sometimes you want data that a user has never entered. In that case…

Capture the user’s referring source via querystring

Querystrings can be used not just to pass data between WordPress forms, but also to prepopulate a single form. Want to grab the referring URL of the individual who just landed on your form? A querystring will do the trick so long as you can edit the referring link.

Just tack the querystring onto the end of the referring URL, and set up a field to receive it the same as Step One details above. ?source=twitter appended to a twitter link, and a Hidden field set up with a Default Value of {querystring=source} will let you know that user clicked a twitter link that led them to your form!

You can find more on this in our How to Auto-Populate Form Fields Using a Query String article.

Capture the referring URL via User Analytics

Want the full URL of the referring source? The User Analytics extension for Ninja Forms has just been upgraded to 3.0 compatibility. It has the capability to capture URL Referer, UTM Campaign, UTM Content, UTM Source, and more. It’s well worth a look if you need a deeper layer of referring information!

Pre-populate logged in user data

If you’re not having the user fill out more than one form, being able to pass data between WordPress forms isn’t as helpful. There’s a way to grab a user’s WordPress information and pre-populate fields with it anyway, though.

Again as described in Step One above, just set up a Default Value for any field with the merge tag of the WordPress user information you want to capture. That’s located under the WordPress tab when you click into the merge tag window. Some of your options there are:

  • The user’s first name: {wp:user_first_name}
  • The user’s display name: {wp:user_display_name}
  • The user’s email: {wp:user_email}

Using any of the above techniques increases the likelihood your form will be completed and will spike your form conversion percentages

A user abandoning a form means nothing but wasted time. You’ve wasted their time with a frustrating form and your time building it. It happens; no form will ever have 100% conversion. It’s a simple fact of doing business. However, these tips will help make your form easier to complete, and you will see the results pay off in higher form conversion. Save your users time, collect more useful data that can turn into sales. It’s simple!

Questions on the tips above? Ask below! Suggestions on how we can make this process easier for you? Please share your thoughts in the comments!