Market & Strategic Communications - University Web Guide The University of Adelaide Australia
You are here: 
text zoom : S | M | L
Printer Friendly Version
Further Enquiries

 

Online Media
Marketing & Strategic Communications
The University of Adelaide
SA 5005 Australia
Email

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

Online 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.

Wikmail forms can be created to work on University of Adelaide TMS websites, with the details of creating the form differing only slightly depending on the style of templates used for the site.

Some things to consider when using Wikmail:

  • Email Delivery Restrictions
    Wikmail will not deliver email to addresses outside the university's domain, and those of a few other affiliated organizations. This stops the form being abused to send SPAM outside the university.
  • Human Verification
    To reduce Wikmail forms being used for spam, a setting is available which will cause Wikmail to note the origin of any form submissions, and if outside the university's network, may present the user with a simple challenge such as an arithmetical question, eg "What is two hundred and thirty five minus four?". The user must answer correctly before any email is sent. This helps to prevent SPAM being sent to recipients within the university.
  • File Upload Restrictions
    Wikmail will not accept uploads in excess of 10MB in size. This helps to prevent denial of service attacks that may attempt to flood our system with data.

Please contact Online Media if you would like any assistance in using wikmail to create forms from within your tms website.

Human Verification

Adding a line into the tms.conf file for a site will cause the verification to be used for all forms within the site:

wikmail_captcha = text
This verification mechanism will only come into play when the form is filled in from a computer outside the university network. In order to try it out inside the network, you can add the following to the form being tested:
<input name="wikmail_captcha" value="1" type="hidden">

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!

 

Creating Online Forms in TMS Sites

To use wikmail, set up a form using Dreamweaver or HTML editor of your choice, using the "POST" method for submissions. The source should look like this:

<form name="formname" method="post" 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.

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. In this context, when a field is said to have a 'true' value, it must have a value that is not an empty string, and not 0 (zero). Note that by default, only recipient and subject are required fields.

hidden field namevalue
handler value="wikmail" instructs the form handler to process this as a wikmail form.
recipient (required)The recipient of the email containing the form results. To send the mail to more than one address, list them all, separated by commas.
subject (required)The text to appear as the "Subject" in the email sent with the form results.
ccThe email address specified in the "email" field on the form is sent a cc email of the form results.
redirectUsed as the page to go to when the form is submitted. Either a complete URL or one that is relative to the web server (eg. "/research/feedback/thanks.html") 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). Do not specify this field unless the page to which it refers exists.
titleThis 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.
sortThis 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_configThis field allows you to specify which of the config variables you would like to have printed in your e-mail message.
requiredA 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. See also client side validation below.
remove_fieldsA comma separated list of form element names. The fields in this list will not be shown in your e-mail message.
missing_fields_redirectA URL to be displayed when required fields have not been entered. This operates similarly to the redirect parameter above.
return_link_urlA 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_titleUsed as the title in the back link generated by return_link_url.
print_blank_fieldsThis field allows you to request that all form fields are printed in the return HTML, regardless of whether or not they were filled in.
results_custom_htmlThe URL of a page with additional information to be displayed on the page shown after the form has been submitted.
wikmail_csvWhen this value is true then the attached values file will be in comma separated values format, instead of the default tab separated values.
wikmail_notsvWhen this value is true then there will not be a values file (either TSV or CSV) attached to the email.
wikmail_timestampvalue="date_submitted" will fill in the field with the time of submission.

Client Side Validation

Using wikmail validation means that if users fill out one field incorrectly they will have to press the back button and fill out all the fields again. We recommend you also add client side navigation. This can be done with a simple include file. Please see webguide internal form validation for more details.

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.

Please contact Online Media if you would like any assistance in using wikmail to create forms from within your tms website.

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.

When using old style University templates, wikmail handles these file uploads, if you include the enctype in the form tag, for example:

<form method="post" action="" 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">

Please contact Online Media if you would like any assistance in using wikmail to create forms from within your website.

 

Sample Form

A sample form is available for viewing or you can contact Online Media for assistance in setting up a form.