URL Redirection

In this example, FormMail redirects the submitter to different URLs upon form submission. Try a demo.

Form

<html>
<head><title>Just testing</title></head>
<body>
<form method="post" action="http://www.uic.edu/htbin/cgiwrap/bin/formmail/FormMail/depts/accc/forms/formmail/example-4.txt">
<h1>Example of FormMail 3.0</h1>
This example shows the use of url re-directing.
<hr>
<p>
<input type=radio name="radbut" value="ac">
Select list of academic programs
<input type=radio name="radbut" value="units">
Select list of campus units.
<hr>
<input type="submit" value="Submit your comments">
</form>
</body>
</html>

Configuration file

<!DOCTYPE form SYSTEM 'FormMail-3.0.dtd'>
<form name="example4" >

  
 <!-- This prevents any mail being sent for this example -->

<mail name="mail1" nomail >


 <!-- Here's the html response header. 
      Note that the <response> sections are evaluated
      in order.  As soon as a url redirection is triggered,
      that's it.  But if something is printed to the screen,
      no more url redirections are considered.
   -->

<response name="r0" if="$radbut eq ac" url="http://www.uic.edu/acdepts.html">
</response>

<response name="r1" if="$radbut eq units" url="http://www.uic.edu/acsup.html">
</response>


  <!-- By this point, url redirection must have failed.  So we
      now generate the full html page, including
      the <html>...</html> tags 
  -->

<response name="r2" >
<![CDATA[
<html><head><title>junk</title></head><body>
<h1>Hey, You!</h1>
You didn't make a selection!
</body></html>
]]>
</response>

</form>
Last updated: 

January 30, 2013