Formmail - design for redirects

Formmail - design for redirects

Posted by: MadDog88
Posted on: 2004-11-17 11:15:00

Hi all-- this seems like a fairly simple request but I've tried a bunch of different things...I am familiar with html but very unfamiliar with java, so that has been my downfall. Here is my basic page:

http://www.dudecandles.com/questions2.htm

I have a formmail set up which is working great. I have 2 radio buttons, email box, and text question box, which leads to a thank you page upon submission.

The forms work great and all the info gets submitted to the same place. What I would like to do is have a different page (www.dudecandles.com/thebird.htm) set up as the redirect page if the option "bad people" is selected. The "good people" option should still go to the thanks.htm page.

Any suggestions? Thanks in advance!

Re: Formmail - design for redirects

Posted by: Atropos7
Posted on: 2004-11-17 15:22:00

In reply to:

I am familiar with html but very unfamiliar with java,


Just to let you know, a common mistake is to confuse the terms Java and JavaScript. These are two very different technologies and a web browser may not support both or any at all, though most mainstream browsers will support JavaScript.

Here is an example:

http://atropos.openvein.org/web/form.pl

Hope this helps.



cool Perl / MySQL / HTML+CSS

Re: Formmail - design for redirects

Posted by: MadDog88
Posted on: 2004-11-17 15:42:00

Great, thanks for the clarification. I tried using the code you supplied and I'm still getting the dreamhost default pages on each submission. I am receiving the data correctly. Did I do something wrong with replacing the code here? Here's the updated code:
http://www.dudecandles.com/questions4.htm

Re: Formmail - design for redirects

Posted by: Atropos7
Posted on: 2004-11-17 15:58:00

onchange="http://www.dudecandles.com/thebird.htm"

Should be

onchange="changeRedirect(this)"

on both the radio inputs, as I stated in the source.







cool Perl / MySQL / HTML+CSS

Re: Formmail - design for redirects

Posted by: MadDog88
Posted on: 2004-11-17 16:56:00

aha! thanks, i was unfamiliar with that command.

unfortunately, it's still defaulting to dreamhost's standard thank you/submission page. is there an adjustment i need to make to the cgi sript?

thanks for all your help. ive tried looking at multiple forums (including formmails') with no luck to get both the submission form and the landing pages to work together (lots of examples on how to get them to work separately). the updated source code is at:
http:/www.dudecandles.com/questions4.htm
thanks again for your help and patience.

Re: Formmail - design for redirects

Posted by: Atropos7
Posted on: 2004-11-17 19:41:00

In reply to:

unfortunately, it's still defaulting to dreamhost's standard thank you/submission page. is there an adjustment i need to make to the cgi sript?


<input type=hidden name="redirect" value="http://www.dudecandles.com/thanks.htm">

You need to add this back. It should not have been removed, and it should be set to whatever page you want them to see in case they forget to choose one of the radio options (it will still send you a message though).



cool Perl / MySQL / HTML CSSEdited by Atropos7 on 11/17/04 07:46 PM (server time).

Re: Formmail - design for redirects

Posted by: MadDog88
Posted on: 2004-11-18 11:52:00

thanks a ton-works great now! I plan to use this code on a different page, but I will leave this one up on my site to serve as a reference/example for others. Thanks again!

Tags: email boxradio buttonshtmformmailredirectsubmissionleadsjavahtmlhttp