<INPUT TYPE=hidden NAME="hidden-field-name" VALUE="hidden value">Zot-Dispatch uses four separate hidden variables to configure its behavior.
The most important of the Zot-Dispatch Variables is ZD-Method.
Zot-Dispatch can perform three basic Actions:
ZD-Mail)
ZD-Reflect)
ZD-Append)
ZD-Method variable's value is split into three parts:
ZD-Method depend(s) on what
you would like Zot-Dispatch to do, and what the value(s) of the other
fields are.
Dispatch Method
The Dispatch Method field of the ZD-Method variable
contains which Action that particular instance of ZD-Method
is describing. The valid values are:
ZD-Mail
ZD-Method.
ZD-Reflect
ZD-Append
ZD-Method.
Destination
The Destination field of the ZD-Method variable
contains information about the destination of the results of the FORM, and
should contain different types of information based on the value of the
Dispatch Method field.
If the Dispatch Method field is set to ZD-Mail
then the value of the Destination field should be an e-mail
address (or a list of comma-separated addresses) to which the results
of the FORM will be e-mailed.
If the Dispatch Method field is set to ZD-Append
then the value of the Destination field should be a (single)
filename to which the results of the FORM will be appended. Multiple
filenames cannot be entered here, even if separated by commas.
We will show you how to append to multiple files using the same
data at a later time.
Important Note: In order for ZD to append to a file, that file must be writable by the server. Depending on your server setup, this may mean making the file world writable (Probably not a good idea).
If the Dispatch Method field is set to ZD-Reflect
then the value of the Destination does not matter. In this case
there is only one client to which the results can be echoed, the users.
Therefore the value of this field is ignored.
Response Template
The Response Template field of the ZD-Method variable
contains information on in which format the response should be. If the
author of the FORM wishes the response to be in the default response, then
this field should be left empty, however, if the author has a template into
which the values of the input fields are to be substituted, the author can do
one of two things depending on where the author wishes to store that template.
If the author wishes to put the template directly into the HTML of the FORM,
then the value of the Response Template field should be
body: followed by the text of the template.
If the author wishes to put the template into a different file which
is readable by the HTTP server, then the Response Template should
be file: followed by the name of the file which contains
the template (the file should be accessible by the server).
The three fields of the ZD-Method variable are separated by
semi-colons and should be given in the same order listed above as follows:
<INPUT TYPE=hidden NAME="ZD-Method"
VALUE="Dispatch Method;Destination;Response Template">
The ZD-Environment hidden variable allows the author of a FORM
the ability to define environment variables which should be made available to be
substituted into a template or placed in the default response. If an
environment variable is named in the value of a ZD-Environment variable and
that environment variable is defined to the server, then its value will be
available to be substituted into a template by using its name for the variable
name.
A list of environment variables that are set by the server can be found here.
For example, if you would like to know which host submitted the FORM, then add the following into your FORM:
<INPUT TYPE=hidden NAME="ZD-Environment" VALUE="REMOTE_HOST">If your Template is the following:
The host that submitted the FORM was: $REMOTE_HOST#Then the result might be (depending on which host submitted the FORM):
The host that submitted the FORM was: www.oac.uci.eduThere can be as many
ZD-Environment variables as there needs to
be and each one can be substituted into the Template.
Zot-Dispatch allows you to define a date format that can be substituted into
templates or included in the default response. The format of the date/time
string you want is placed in a hidden variable named
ZD-Date-Format and uses the same formatting strings as the UNIX
"date" command on the server's machine. If ZD-Date-Format is
left blank then the "date" command's default output will be used, however,
if the hidden ZD-Date-Format variable is not included at all,
then the date/time will not be available to enter into the Template.
The Date/Time string can be substituted into a Template by including $ZD-Date# in the Template where you would like the string to appear.
If you have the following Template:
The date is: $ZD-Date#And you have
ZD-Date-Format set in the FORM as follows:
<INPUT TYPE=hidden NAME="ZD-Date-Format" VALUE="%B %d, %Y">The result might be (depending on your version of "date"):
The date is: November 04, 1994If more than one variable named
ZD-Date-Format is present only
the last will be used.
The hidden variable ZD-Owner defines an e-mail address to which
any errors that might occur while processing your FORM will be sent. If any
errors do happen to occur, the address in ZD-Owner will be sent
a list of the errors that occurred, and a list of all the name/value pairs
that were sent to the server by the client.
Some errors that might cause e-mail to be sent to ZD-Owner are:
ZD-Owner is meant to help determine the cause of the error.
Multiple addresses can be given in ZD-Owner as long as they
are separated by commas. Multiple variables named
ZD-Owner can also be given and all addresses will receive a copy
of the errors.