How do I setup the redirect page based on user's selection ?

In this article we will present 2 methods to redirect your user upon completing the form, based on the data he submitted.

Method 1 - Using the Return URL feature

For this method, scripting knowledge is not needed.Let's assume that your radio group form component is named "radio". The items of this form component will have to look similar to this:

  •|Motor sports

In the "Form Info" tab, just fill in the "Return URL" option with the following syntax:



Your form's specific placeholders can be viewed by clicking on the "Toggle Quick Add" button, found in the upper-right corner.

  • The "|" pipeline symbol is being used to split the value from the label of the radio group item.
  • In the frontend, the radio group options will only show the text after the pipeline (in this case hobbies and not the URLs). The actual value of the placeholder inherits the text before the pipeline.
  • The {radio:value} will be replaced with an URL.
  • There is also a placeholder available for the right part of the pipeline, the label itself. The syntax for this radio group would be {radio:text}.

Method 2 - Using the PHP scripts area

The second method would be to create a custom PHP script, that will check the value of your field and redirect accordingly.

Assuming your radio group is named "radio" and the items as follows:

  • 1|Cycling
  • 2|Motor Sports
  • 3|Parkour

By using the code below in the Scripts called after form has been processed, the user will be redirected after he submits the form

    if($_POST['form']['radio'] == '1'){
      }else if($_POST['form']['radio'] == '2'){
        }else if($_POST['form']['radio'] == '3'){

If you are using dropdown elements instead of radio groups, remember to add the [0] index to the post variable (e.g. $_POST['form']['dropdown'][0] )

29 persons found this article helpful.

Was this article helpful?

Yes No
Sorry about that