How to pass values from one webform to another

Once you have created the two webforms you should make sure that you created a common field in which you will pass the value to, from the initial form.

The 1st step is to activate the option “Allow all elements to be populated using query string parameters” in the second webform. You can find this option at your webform Settings → Form → Form behaviour-> Prepopulated.

The 2nd step is to set the default value of your element in the second webform as follows:

[current-page:query:value]

You can set the default value as said by navigating to the second webform’s Build → Edit (of each element) → Advanced → Default Value.

The value can have any name but must match the value used in the URL from the first form which is formed as described in the final step.

Finally, the last step is to build the link from which somebody can access the prefilled (second) webform. The link should be built as follows:

/form/second_webform_name?value=[webform_submission:values:element_key]

The element key refers to the key of the element of the initial webform. It is the one that you want the value to be passed to the second form. If you wish to pass more values, you can add more similar pairs of value-element key (value =[webform_submission:values:element_key]) in the link using the “&” after each one.

Once the link is formed you can use it in redirecting the user from the initial form to second after the submission or you can also send it to user once the first form is submitted by creating an email notification in the Emails/Handlers.

1 Like