Developer Support »

Redirect to different pages depending on a submitted form value  (See more user questions)

Hi .

Thank you for your purchase. Good to hear from you.

There isn't a facility for that in the script, but I can show you a snippet
of code that you can add to the script, which will work as you desire.

Locate this line in the script:

$redirect_url = "";

Below it, add this code:

if($_REQUEST['drop-down-field'] == "this"){$redirect_url = "http://example.com/thankyou.htm";}

if($_REQUEST['drop-down-field'] == "that"){$redirect_url = "http://example.com/thankyou2.htm";}

...replace 'drop-down-field' with the name of your dropdown field. Replace
"this" and "that" with the values in question here. Change the redirect
URLs to suit too.

Save the script and upload it to your webspace.

In the above example, if the submitted value is "this" the visitor will get
redirected to http://example.com/thankyou.htm . If the submitted value is
"that", the visitor will get redirected to http://example.com/thankyou2.htm
.

Any questions, just let me know.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Wednesday, May 26, 2010 10:46 PM
Subject: FormToEmail script


> Comments: I purchased your multi license version and I have a support
> question:
>
> Can I have more than one redirect on a form?
>
> Need to redirect the form 'on submit' to a certain page
> based on a particular form field (dropdown) selection.
>
> Bassically, visitor will be taken to one (of two) redirect pages based on
> a particular form selection choice.