(Advanced) Pass values from a form confirmation page into another form

In this article:


There may be occasions when you want to pass user values from the confirmation page from one LGL form into another—in other words, to keep some data from an LGL form that was already submitted and pass it into another form. An example would be selling tickets to an event and asking registrants to make a donation once they're done purchasing tickets. There are some good reasons for using two forms instead of one long one: The data you want to capture may be too complex for one form. There are also technical limitations, such as not being able to combine recurring transactions and multiple transactions within one form.

To make life a little easier for those who are submitting your form, you can pre-populate the second form with some of the information they provided in the first form. The illustration below shows the concept: The name and email address supplied by the person in Form-1 will be passed into and then will pre-populate Form-2.

Confirmation page

To build the confirmation page, go to the Confirmation tab for your Form-1. You'll need to use HTML formatting to build the link that goes to your Form-2:

When creating the link to your Form-2, you will use the Publish code from your Form-2 as the destination and then add the values you want to pass through into Form-2. To do this, go to your Form-2 and click Publish.

Then select the URL in the Link to form section, as shown here:

You'll use this destination in the link you put in the Confirmation page for Form-1. At the end of that destination, add a question mark and the fields you want to pass through. 

In your Form-2, the fields for first name, last name, and email are most likely going to be field_6, field_7, and field_9. You can confirm this by looking at the Confirmation section of your Form-2 and then looking at the merge list on the right:

The example below shows the URL destination followed by the part where values are being passed (see the boldface text in the HTML code shown below):

<a href="https://secure.lglforms.com/form_engine/s/YdL1qt5dMJT1bwBtol5HOQ ?field_6=[[first_name]]&field_7=[[last_name]]&field_9=[[email]]">Go to donation form</a>

Form-2 gets pre-populated

When Form-2 comes up, it will be pre-populated with the values passed from Form-1:

Important note about credit card data

For security reasons, LGL does not store credit card information. This means that each and every form submission needs to be accompanied by credit card information that is passed directly to the payment processor. So if you use approach described in this article, even though the donor has provided their credit card information in their first submission there is no way to avoid requiring them to re-enter it in the next form.