|
Waikato
| Ticket ID |
15325 |
| Question |
The University of Waikato has one main server adminstered centrally, at http://www.waikato.ac.nz. |
| Post Time |
24/7/2000 PM 12:20:00 |
Form Engine
People writing web pages often want to receive feedback from their readers. The University of Waikato Form Engine is a simple piece of software which allows page authors to to have this happen simply by placing files in their own area on this server. No programming is required.
What It Can Do
If you write a web page containing a form which uses the form engine, the information a reader types into that form is sent to a log file, and can also be mailed to you. The log file can be in the form of an HTML page, allowing it to act as an on-line visitors' book, or can be ordinary text. A message of your choice can be shown to the reader telling them that their message has been received.
(If you're not too sure about how to use forms, take a look at the examples here.)
The form engine was written here at the university in response to specific requests from customers. That means that it does what its users over the years have wanted done, rather than everything that might be wanted. On the other hand, because it was written here it can easily be changed. If you'd like it to do something else, please contact webserver@waikato.ac.nz.
How to Use It
To use the form engine, you need to write a web page containing a form, and an accompanying file to tell the form engine what to do. Let's take as an example a form containing only a couple of fields, and located in a directory or folder called "latin". The page is called "mypage.html" and the file is called "mypage.data".
In your form you can have any fields you like, but you must precede them with a line like the one you see here:
That first line says where the form engine is, and also tells the form engine where to find your file which tells it what to do. The rest of this page deals with what needs to go into that file.
Telling the Form Engine Exactly What To Do
The file which tells the form engine what to do might look like this:
LOGFILE form-logs/latin.html
LOGFORMAT HTML
MailTo a.staffmember@waikato.ac.nz
MailFrom webserver@waikato.ac.nz
subject Expression of Interest
comment Your name and address have been forwarded to the Department of Latin
On each line are an attribute and the value you want to give to that. You do not need to use all available attributes. It does not matter in what order they appear in the file. It does not matter whether you use capitals or not for the attributes, though it sometimes does matter for the values.
In full, the attributes you can choose to use are:
comment
This is the message which appears on the screen after the reader sends their information. If you omit this, they'll be told their form has been received by The University of Waikato.
logfile
This is the name of the file to which information sent to your form is to be logged. You must specify this, and the name must begin with "form-logs/" as in the example. You can read your log file through the web. In the example you'd look at http://www.waikato.ac.nz/form-logs/latin.html . Do check that your chosen name isn't already being used.
logformat
If you specify (as in the example) that logformat is to be HTML, your log file will have simple additions made to it to make it more readable through the web. If you specify that logformat is TEXT, or you omit this, these additions won't be made.
mailto
This is the address to which the information entered is to be mailed. If this is not specified, the information will be logged but not mailed.
mailfrom
If mailto has been used, this is the From address to be used on the mail sent out. If mailto has not been used, this attribute is ignored. If mailto is used and mailfrom isn't, Your mail will be marked as coming from webserver@waikato.ac.nz.
subject
If mailto has been used, this is the Subject to be used on the mail sent out. If mailto has not been used, this attribute is ignored. If mailto is used and subject isn't, your mail will have a blank Subject.
|
|
|