User Guide

 

How to Automatically Pass Form Data to Another Form

How to Automatically Pass Form Data to Another Form

We know how to prepopulate a JotForm Form via URL parameters as mentioned in this guide. Now how do we prepopulate another form from another form's data?

Here's a guide on how to redirect the user to another form and prepopulate the second form with the previous form's data. You can follow the steps below.

Step 1 - Setup two forms, namely "Form 1" and "Form 2".

Form 1: https://form.jotform.com/53541423066955

Form 2: https://form.jotform.com/53542179889977

Step 2 - The two forms are identical and we are showing different input fields, this is to demonstrate how each field can be populated.

Step 3 - The idea is that we want to have Form 1's data to be prepopulated to Form 2 after clicking the submit button.

We will add the prepopulated URL of Form 2 in an email alert and in the "Thank You" page for you to see how it works. You can try filling out my Form 1 and see how it looks like.

Here's the final prepopulated Form 2 URL that I have:

https://form.jotform.com/53542179889977?fullName1[first]={fullName:first}&fullName1[last]={fullName:last}&email2={email}&textBox8={textBox}&textArea7={textArea}&dropDown4={dropDown}&radioButton5={radioButton}&checkBox6={checkBox:0},{checkBox:1},{checkBox:2}

This is how Form 2 URL is structured:

Blue highlight: Form 2's direct link

Magenta highlight:

"?" - We will start the prepopulation by adding first this symbol

"=" - To assign a value on a form field

"&" - To  add more than one form field to be prepopulated

Yellow highlight: This is the field name from Form 2. You can get the field name by following these guides:

a.) Step 3 on this link Prepopulating fields to your JotForm via URL parameters

b.) How to find field IDs and Names

Green highlight: This is the field name from Form 1 but wrapped in {}.

Step 4 - To be more specific, here's how each part of the URL works:

For form fields with single input or single text box, let's say email field, text box, text area, radio button, drop down, this is how they are structured:

Email field:

email2={email}

This states that you want the email field in Form 2 (left side) to be filled out using the email input from Form 1 (right side).

Radio button field:

radioButton5={radioButton} 

This states that you want to select the radio button in Form 2 (left side) to be filled out using the selected radio button in Form 1 (right side). Noticed that after the "=" sign, field names are wrapped in {}, this means we are getting the field value from Form 1. 

This is quite different for form fields with multiple text boxes or options, e.g. Full Name field and for Check boxes.

Full Name field having two text boxes, text box 1 is for the First name and text box 2 is for the Last name. If you check the field name in the HTML, you will see how the name attribute is structured.

In our prepopulated Form 2 URL, this is how it looks like when prepopulating the first and last names:

First Name:

fullName1[first]={fullName:first} 

Last Name:

fullName1[last]={fullName:last}

Noticed that the right side part of the parameter is using ":" (colon), this is to specify which text box we want to get the value from the full name field, for first name use ":first", for last name use ":last".

For Checkboxes, this is how we get the value from Form 1:

checkBox6={checkBox:0},{checkBox:1},{checkBox:2}

The right side shows using ":" (colon) again, but we will use numbers after it, these are indexes to identify the check boxes. I have 3 check box in my form which means I need to have indexes "0", "1" and "2". You can find this under the Properties window of the check box field. Separate each of them using a comma. Here's how to find them:

1. Click the GEAR icon to open the Properties Wizard

2. Go to the ADVANCED tab

3. Scroll all the way down to the bottom

4. Click FIELD DETAILS

Here you can see the field unique name and field IDs:

Related guide: How to find field IDs and names

Step 5 - Now I will add our custom prepopulated Form 2 URL in our email template (either on your email notification or autoresponder email) to have a copy of it in the emails, and in the "Thank You" page so that user will be redirected.

Here's a screenshot to where I am adding it to my autoresponder.

In the insert/edit link window, paste the prepopulated URL here:

I will also add it in my "Thank You" URL to automatically redirect the user to Form 2.

1. Click SETTINGS at the top

2. THANK YOU PAGE on the left

3. Select REDIRECT TO EXTERNAL LINK

4. Then paste the PREPOPULATED URL

Related guide: Redirecting Users to a Different Page

You now have an automated way to pass Form 1's data to Form 2 directly using its URL, you also have that saved in your email notification/autoresponder.

For questions, feel free to leave us a comment below.

Send Comment

18 Comments...

  • bhage

    I am having trouble prepopulating a hidden text field. If I unhide it it works great. I do not have a problem populating hidden number fields so I am confused. Thanks for the help!

  • abdel160

    I'm using "image choices" and I only need to pass the NAME of the option chosen. unfortunately when i use the hidden field it passes a whole html table with the image plus name. is there a way to do this?

  • innovalinks

    Hello, this works perfectly when you are dealing with one submission at a time. But is there a way for it to work when you receive multiple "Form 1" submissions before you get to open the prepopulated "Form 2" URL?

    What I have found is that everytime I click on the prepopulated URL, if I have 4 submissions, it will retrieve the latest form data, then the previous one, then the previous one and so forth.

    Is there a way to make the URL call up the fields for a specific form sumbission?

  • realfoodsales

    Your example of populating form 2 with data from form 1 is EXACTLY what I need to do. although form 2 will have additional fields that need to be completed by another person.

    I have the 2 forms created already. Can I hire someone from Jotform to link them together?

    The form 1 submit will populate form 2 and send that form to another person who will complete it and send to me.

  • ashcreighton

    I can get this to work for text fields but not for checkboxes; I've been trying for hours. It's definitely picking up the checkbox option (and displaying it in the resulting URL), however when I open the new form, no box is selected :( Can you help me with this? For reference, my form is at https://form.jotform.us/71586711502151 -- thank you very much :)

  • sousadepos

    Is it possible to pass values of tables that are made with text boxes, drop downs and check boxes?
    How would I go about coding that?

  • DavidGrayTV

    Well you could not have made this more complicated if you tried. I have spent 8 excruciating hours trying to pass one simple email field into a second form and can I hell as get it to work. Why don't you do video tutorials instead. You are so behind the times. To say I am frustrated is an understatement!!! grrrrr

  • clesiolandini

    Hi.
    Could you share Form1 and Form2?
    Thanks.

  • rhenry

    I am trying to prepopulate a payment form with the total from the main registration form and I want the thank you page to be the payment form. Problem 1: I can't figure out how or where to change the URL to prepopulate the payment form. Problem 2: I set up a conditional on the registration form to have submit button take you to the payment form and it shows on the conditional page, but does not work when tested with a form submission. This is the registration form: https://form.jotform.us/62075627809160; and this is the payment form https://form.jotform.us/70874394087165. I appreciate any assistance.

  • sbufsaweb

    I have many radio button options that won't copy from one form to the next since they have commas. Is there a fix or workaround I can use for this?

  • miguelhdezs

    Hi,

    It is possible to send the data of two text boxes to another single text box but in diferent form.

    Example:
    FORM ONE: Firs name + Last name
    FORM TWO: Name

    Thanks

  • veshman

    This doesn't seem to work for encrypted forms.....

    Is that correct or do I need to do something different?

    Thanks,

    Bhavesh Patel

  • ISCAForms

    Opps, should have included - same issue with phone number. I used the Quick Field for phone number and it does not break the phone number into area code/Phone when it does the prefill. How do do phone?

  • ISCAForms

    This is wonderful! Works exactly as described. I used this along with the Conditional Thank you and instead of having a long link in an email or on the Thank you page, I have it starting a new form - based on a condition in my form (do you need another form? yes/no).

    Works perfectly EXCEPT. I have fields for address. Using the canned address input. How do I grab those to repopulate the next form?

    I tried using {address1520}. While that gets the right information, I can't figure out how to get address, City, ST and Zip into the correct fields on Form2.

  • poudreriver

    Can I do this with data from a form that has dynamic fields?

    I want to create a registration form where any number of children's names are entered. If the family has one child, only one field will be filled in. If they have 3, they will be able to add 2 more. Is it possible then to pass the children's names to another form? I won't know how many fields there will be to send the data from.

  • cynthia

    great

  • santanaw

    In regards to this, can I pass data to a jotform form even if I embed the form on my webpage?

  • iiilucky1iii

    I am having some major issues trying to get calculated fields to pre-populate. I have two forms; form #1 is a Purchase Order (https://form.jotform.com/60675198097166) this form will be filled out by my sales guys and then the salesman can click a switch field (on form #1) to "Request A Quality Control Inspection" upon turning the switch on, the form will trigger a condition to send out an email notification to said QC inspector with a Pre-Populated form "Form #2" (https://form.jotform.com/60676257886169) with the original Purchase Order information (hiding the costs, etc.) so that the QC inspector has the listed items to go and inspect.

    For whatever reason only my first item's information is pre-populating...not the remaining 5 items. Please help if you can...I know it is confusing how I explained it! :)

    -Amanda