Cognito Forms – Sending to Multiple URLs Based on Selection

cognito-forms

Can I send users to different pages based on information submitted on the form?

I have a multiple choice question with four choices which leads to four outcomes based on the selection. Below is a calculation inserted into the submit button:

=if HowManyMilesDoesYourCarHave.contains("25,001-50,000") then "outcome02.html" else "outcome02.html"

This works to send users to the one page, but how do I include the other three selections?

Best Answer

To redirect users to different pages based on their selection:

  1. Add a calculation field to your form labeled "Redirect URL" (or something similar). Its type should be Text, as this field will output a URL or website address.
  2. Use the following if/then statement as your calculation:

=if Choice = "First Choice" then "http://www.mywebsite.com/outcome01.html" else if Choice = "Second Choice" then "http://www.mywebsite.com/outcome02.html" else if Choice = "Third Choice" then "http://www.mywebsite.com/outcome03.html" else if Choice = "Fourth Choice" then "http://www.mywebsite.com/outcome04.html" else ""

Make sure to replace "Choice" with the name of your choice field and "First Choice", "Second Choice", etc. with your choice field options.

  1. Find your form's Confirmation Options from the Submission Settings, and insert the calculation field into the Redirect Url section. Now, when a particular choice option is selected, the user will be redirected to a specific page depending on their choice.