Hi,
Currently FormMail has a feature where you can derive fields from other fields. However, this feature doesn't currently allow you to use logic to derive fields - it's a simple concatenation with a set of joining operators.
To do what you want, you need a program - a set of logical statements and actions.
So, until FormMail has these features, you need to use other logic. You could write that logic in PHP or JavaScript.
If you're concerned about JS being switched off then you might be better to write the logic in PHP.
It's actually pretty easy to link this in with FormMail. Start a file called "submit.php" like this:
PHP Code:
<?php
//
// whatever logic you want to run goes here. Assuming POST method,
// you can access fields in the $_POST array and also set them there
// for FormMail to process when it's included
//
if (isset($_POST["somefield"]) && $_POST["somefield"] == "yes")
$_POST["good_url"] = "http://www.yoursite.com/theysaidyes.htm";
//
// Now include FormMail to do all the rest of the work...
//
include("formmail.php");
?>
Put it in the same directory as formmail.php and then use submit.php as your form action instead of formmail.php.
Bookmarks