Formmail - design for redirects

design

#1

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!


#2

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


#3

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


#4

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


#5

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.


#6

<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 CSS


#7

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!