ZD-Method. There may be situations, however, where you can't
or don't want to place the value(s) of one/more of those fields directly
into the ZD-Method variable itself. Here are a few example
situations:
A:You have a FORM that e-mails a copy of the results to the user
of the FORM. In order to do this the user has to be able to enter in an e-mail
address which can then be entered into a ZD-Method hidden
variable.
B:You have a FORM that allows the user of the FORM to select in which
format the results are returned. In order to do this, the
Response Template field of ZD-Method needs the ability to
have its value change.
These are examples of two situations in which the value of a field of
ZD-Method needs to change. Our solution is quite simple: In each
of the fields of ZD-Method you have the option of placing the
name of a different input field in which the value of that
ZD-Method field is defined. The name of the input field must be
preceded by a dollar sign ($) and followed by a pound sign (#). Here are
solutions to examples A and B above:
For A the HTML might look like the following:
<INPUT TYPE=hidden NAME=Here, the value that the user types in for e-mail-address is substituted into the Destination field ofZD-MethodVALUE="ZD-Mail;$e-mail-address#;"> <INPUT TYPE=text NAME="e-mail-address">
ZD-Method.
For B the HTML might look like the following:
<INPUT TYPE=hidden NAME=Here, the type of response template used is determined by which radio button the user selects. Whichever is selected is substituted into the Response Template field of theZD-MethodVALUE="ZD-Mail;lmegliol@uci.edu;$response-format#"> <INPUT TYPE=radio NAME="response-format" VALUE="file:/dir1/dir2/file1" checked> <INPUT TYPE=radio NAME="response-format" VALUE="file:/dir1/dir2/file2">
ZD-Method variable.
Any of the three ZD-Method fields can be substituted in this
manner to suit whatever needs you may have.
As you should know, it is possible to have multiple input variables with the
same name. If it should happen that there is more than one variable of the
same name being indirectly assigned into a ZD-Method variable,
different things might happen:
<INPUT TYPE=hidden NAME=ZD-Method VALUE="$method#;;">
<INPUT TYPE=hidden NAME="method" VALUE="ZD-Reflect">
<INPUT TYPE=hidden NAME="method" VALUE="ZD-Mail">
Only the value "ZD-Mail" will be used.
<INPUT TYPE=hidden NAME=Only the "file:/dir1/dir2/file2" response template will be used.ZD-MethodVALUE="ZD-Reflect;;$reflect-template#"> <INPUT TYPE=hidden NAME="reflect-template" VALUE="file:/dir1/dir2/file1"> <INPUT TYPE=hidden NAME="reflect-template" VALUE="file:/dir1/dir2/file2">
<INPUT TYPE=hidden NAME="Both addresses will receive the response. This works forZD-Method" VALUE="ZD-Mail;$addresses#;"> <INPUT TYPE=hidden NAME="addresses" VALUE="user1@host1.domain1"> <INPUT TYPE=hidden NAME="addresses" VALUE="user2@host2.domain2">
ZD-Append also, but unlike the E-Mail Destination
field (which can have multiple values separated by commas)
only one filename can be included in
each instance of the hidden variable to be substituted into
ZD-Method. For example:
<INPUT TYPE=hidden NAME=This will successfully append the same information to two different files. If both filenames are in the same variable separated by commas, however, it will not work.ZD-MethodVALUE="ZD-Append;$append-files#;"> <INPUT TYPE=hidden NAME="append-files" VALUE="/dir1/dir2/file1"> <INPUT TYPE=hidden NAME="append-files" VALUE="/dir1/dir2/file2">
<INPUT TYPE=hidden NAME=If the user does not select /dir1/dir2/selectable-template then /dir1/dir2/default-template will be the only value returned to Zot-Dispatch causing it to be reflected. If the checkbox is chosen, then both values will be returned causing the last one (/dir1/dir2/selectable-template) to be reflected instead. This same principle can be used on the Dispatch Method field also.ZD-MethodVALUE="ZD-Reflect;;$template-variable#"> <INPUT TYPE=hidden NAME=template-variable VALUE="file:/dir1/dir2/default-template"> <INPUT TYPE=checkbox NAME=template-variable VALUE="file:/dir1/dir2/selectable-template">