Web Standards Guide
The University of Adelaide Australia
Web Standards Home
Conditions of Use
Content style guide
Plan your site
Develop your site
Upload your pages
Extend your site
Create forms
Create navigation
Create CD of Site
User access
Secure your files
Hex Chart
Visual Identity [external link]
Contact us
Online Media Request

Online Media Unit
Level 7, Old Classics Wing
THE UNIVERSITY OF ADELAIDE
SA 5005
AUSTRALIA
Email


Telephone:
+61 8 8303 3280
Facsimile:
+61 8 8303 4829

Create forms

Usually creating web forms requires a knowledge of web programming. To simplify this process, a program called wikmail is available on the main University web server which provides a means of creating simple online forms without the need for additional programming. In programming terms, wikmail is a web form to email gateway installed on the main University web server. It can be used to email the values that people enter into a web form. This can be useful if you do not want to use a specialised CGI program to handle the data.

Wikmail form mailer allows an email to be sent to a specified recipient when someone submits an online form. Wikmail takes details entered on the form, which could be information ticked in boxes, selected from a drop-down menu, or typed in a text field, and sends it to the specified recipient as an email. When the form is submitted, Wikmail also displays a summary of the information entered for the person submitting the form.

Why use Wikmail?
Wikmail is a simple tool that does a simple job. For customised output based on the input of a form, or reports based on the values people enter, it is necessary to have a custom CGI program written to handle the form.

Using Wikmail with old style University of Adelaide templates
To use wikmail, set up a form using Dreamweaver or Netscape Composer, using the "POST" as the submission method and "/cgi-bin/site-bin/wikmail.pl" as the action. The source should look like this:

<FORM action="/cgi-bin/site-bin/wikmail.pl" method="POST">
other form elements etc...
</FORM>

Using Wickmail with tms templates
To use wikmail, set up a form using Dreamweaver or Netscape Composer, using the "GET" as the submission method. The source should look like this:

<form name="formname" method="get" action="">

and you should also include a hidden field specifying that wikmail is the handler for the content

<input type="hidden" name="handler" value="wikmail">

As tms pages need only contain the content and do not require to pageheader, etc to be specified because they are determined by the templates, you do not need to specify those hidden fields when creating forms for tms sites.

Please contact online media if you would like any assistance in using wikmail to create forms from within your tms web site.

Hidden Fields
Once the basic form has been created, "hidden" fields need to be added to the form for wikmail to work correctly. Dreamweaver supports adding hidden fields to a form, however if you are using Netscape Composer you will have to edit the HTML code directly to add these. The following hidden fields can be used within the form tags to customise the form. Note that only recipient is a required field.

hidden field name value
recipient The recipient of the email containing the form results.To send the mail to more than one address, list them all, separated by commas. Required field.
subject The text to appear as the "Subject" in the email sent with the form results
redirect Used as the page to go to when the form is submitted. A complete URL must be entered for this field to work. If this field is not specified, a standard page appears displaying the values entered on the form and optionally providing a link to follow (see above).
title This form field allows you to specify the title and header that will appear on the resulting page if you do not specify a redirect URL.
sort This field allows you to choose the order in which you wish for your variables to appear in the e-mail that FormMail generates. You can choose to have the field sorted alphabetically or specify a set order in which you want the fields to appear in your mail message.
print_config This field allows you to specify which of the config variables you would like to have printed in your e-mail message.
required A comma separated list of form element names. If any of the fields in the list are not filled in, wikmail will reject the form, instructing the user to go back and fill in the missing section.
missing_fields_redirect A URL to be displayed when required fields have not been entered.
return_link_url A URL to offer the person to follow as a link after they've submitted the form - If you include this field, you must also include return_link_title (see below).
return_link_title Used as the title in the back link generated by return_link_url.
print_blank_fields This field allows you to request that all form fields are printed in the return HTML, regardless of whether or not they were filled in.
wf_pagehead The URL of the pageheader to be used for form page.
wf_navigation The URL of the navigation file to be used in form page.
wf_template The URL of the template file to be used with form page.
results_custom_html The URL of a page with additional information to be displayed on the page shown after the form has been submitted.

Special Fields
Optionally, if you want email sent to you by wikmail to appear as if it had come from the person filling in the form, then you can use special form elements named "realname" and "email" as shown below.

Name: <INPUT type="text" name="realname">
Email: <INPUT type="text" name="email">

The name and email address which appear on the email are set to the values entered by the person filling in the form and depend on them entering these details correctly. It is recommended that these fields be made required entries, using the required hidden field described above.

Files submissions
It is sometimes useful to allow people to attach a file when submitting a form. For example, you may want people to be able to attach an image of themselves with the form information. Wikmail handles these file uploads, if you include the enctype in the form tag, for example:

<form method="post" action="/cgi-bin/site-bin/wikmail.pl"
 enctype="multipart/form-data">

Then you can have a field for the file to be included in the email as an attachment, for example

<input type="file" name="attachedfile">

Notes
Do not attempt to create a form that uses a "mailto:" action field for the form, such as:

<FORM action="mailto:user@adelaide.edu.au">
...
</FORM>

Although this may work on some browsers, many do not support it and even those that do appear to work may fail to send the information if the email client hasn't been setup correctly. Imagine how annoying it is for someone to spend a large amount of time filling in a form and then not being able to submit. For that reason, please use wikmail.

And finally, please remember to test that your form works before asking people to fill it in!