Using Transform to Process Web Forms
This documentation was adapted from the Web
Form with Transform 3.0: the Users' Guide
Table of Contents
Before You Begin
The following assumptions are made and guidelines are provided in this tutorial:
- You are comfortable with HTML and web design.
- You have previously created a Web Form. (If you have not, see Creating Web Forms for more information.)
- You are comfortable with either creating files on the IUPUI Champion server with the Pico editor, or with using an FTP application to upload files to your Champion
- You are running your web pages from the www directory from your home
(~networkid) account on the champion.iupui.edu server.
- You are comfortable with basic UNIX commands, such as mkdir and cd.
- There may be other ways to handle directory structures, etc., when working
with forms, but the methods outline below provide the simplest way to maintain
your files and directories.
- Commands you are directed to type should be followed by pressing ENTER.
- Transform template examples are based upon the sample form.
Back to Top
Transform is a utility written at Indiana University for processing HTML/Web
forms. It does not create HTML files. Using this utility, you can direct form
data to an E-mail message or to a file. You can specify the format the form data
takes, the response to the user who submits the form, and check for incomplete
Back to Top
Overview of Transform
- You will create both an HTML and a Transform template file for each form you
- Both the HTML and the template file must reside in the same physical
directory on champion.iupui.edu and have the same name, except for the
- Each HTML file must have an .html extension, and each corresponding
Transform template file must have a .tpl extension.
- To reduce confusion, you may want to create a new directory specifically to
house your web form and template files, although that is a matter of preference
rather than rule.
- You can include comments in your template by beginning the line with a
number sign (#).
- To refer to data supplied by the user for a specific form field, include
the field name in square brackets. For example, [name]
- Required modules in a Transform template are set off with
* … *. For example, *email-response*
- There are at least two required modules in a Transform template:
*email-response* and *success-response*.
- The *email-response* module specifies the Network ID to which the
form response should be mailed, who the form respondent is, and the subject and
content of the message.
- The *success-response* module returns a web page to the reader's web
browser indicating that the form submission was successful, and may include a
summary of all or some of the data the reader supplied.
Back to Top
Installing Transform in your Account
- Logon to champion.iupui.edu.
- Change to your www directory. Type: cd www
- Create your forms directory. Type: mkdir Forms
- Change to the new forms directory. Type: cd Forms
- Type: tf_install
DO NOT DELETE either the tf_support directory or transform.cgi file as
long as you wish to process web forms through your account.
- Transform will create a new directory called tf_support in your home
- Transform also copies a file called transform.cgi into your www
directory. Because this is a special file used by the Transform program, it will
be automatically updated whenever a new version of Transform is released.
NOTE TO ADVANCED USERS: You may install multiple copies of transform.cgi
in separate directories if you have a need for special access control mechanisms
such as password protected web pages.
Back to Top
Creating A Simple E-mail Response Form
based upon the sample form
Remember, both your HTML file and your Transform template file must reside in
the same directory in your account on champion.iupui.edu. You can either use the
Pico editor on champion to create this file, or create it on your local
workstation, then FTP the file to champion.
Your template file must have the same name as the accompanying HTML file, but
should have an extension of .tpl rather than .html.
NOTE: The first four (non-comment) lines of the *email-response* section
- To: your E-mail address
- From: the reader's E-mail address
- Subject: a subject message
As you create the template file, type the information requested exactly as it is
shown in the sample below. In the case of italicized text, replace the
information requested with your own information. For example type
your E-mail address here should be replaced with the E-mail address to
which you wish the form responses sent.
# begin template
# *email-response* section
To: type your E-mail address here
Subject: Question from [name]
[name] submitted this Ice Cream survey
E-mail address: [email]
[name]'s favorite ice cream is [favorite] [other].
[name] has a [entry].
[name] discovered his/her favorite place to each ice cream from one or more of
# Now let's add a section which describes a successful form submission
# Note the *success-response* section header
# Since this response is being returned to the user's www browser it
# must be a correct html document
<TITLE>The Ice Cream Survey</TITLE>
<P>Thank you, [name], for your submission</P>
<P>I have recorded the following survey information:</P>
<P>[name] submitted this Ice Cream survey</P>
E-mail address: [email]<BR>
<P>[name]'s favorite ice cream is [favorite], [other].</P>
<P>[name] has a [entry].</P>
<P>[name] discovered his/her favorite place to each ice cream from
one or more of the following:<BR>
# end template file
Back to Top