What Directives does the script use?
Advanced Form Mailer makes use of 4 types of directives: mailer directives,
info directives, email formatting directives, and error checking directives.
All directives are case sensitive, and are ALLCAPS (the EarthLink specific
version of Advanced Form Mailer allows certain mixed case mailer directives
for compatibility reasons).
MAILER DIRECTIVES
- <INPUT TYPE=HIDDEN NAME="RECIPIENT" VALUE="...">
-
This directive specifies the recipient email address for the Form data.
The value must be a valid email address. No error checking is done against
the value you specify (the script protects you from bad data from your
users, not from you). :)
The value can be a list of comma separated email addresses.
This directive is not optional.
- <INPUT TYPE=HIDDEN NAME="THANKURL" VALUE="...">
-
This directive specifies the URL to redirect the client's browser to if they
correctly filled out the Form.
This must begin with either a ('/' or with 'http://....). This directive is
not optional.
- <INPUT TYPE=HIDDEN NAME="SUBJECT" VALUE="...">
-
This directive specifies the subject of the email generated from the
contents of your Form. If unspecified, this defaults to 'MAILTO.CGI FORM
DATA' in the current version of the script. This is an optional directive.
- <INPUT TYPE=HIDDEN NAME="FROMADDRESS" VALUE="...">
-
This directive specifies the email address the Form generated email should
appear to come from. This can be useful for advanced applications of this
script. This also allows you to easily filter mail that came from your
online Form. This is an optional directive.
INFO DIRECTIVES
- <input type=hidden name="BROWSER_INFO" value="">
-
This value acts like a switch. If specified, information about the user's
web browser is attached to the bottom of the email message generated from
the Form data. If not, well, it doesn't. This is an optional directive.
EMAIL FORMATTING DIRECTIVES
- <INPUT TYPE=HIDDEN NAME="SEPARATOR" VALUE="...">
-
This directive specifies the separator string between the Field name and the
Field data in the generated email message. This is an optional directive.
- <INPUT TYPE=HIDDEN NAME="ALPHA_SORT" VALUE="">
-
This directive behaves like a switch. If it is not specified, the Fields
in the email message will be in the same order as they were in the HTML.
If you use this directive to turn ALPHA_SORT on, the Fields will be
sorted alpha-numerically. This is an optional directive.
ERROR-CHECKING DIRECTIVES
-
These directives are all explained individually in the FAQ. For that reason
they are only listed here. All these directives are optional.
-
<INPUT TYPE=HIDDEN NAME="CHECK:NOTBLANK:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:EMAIL:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:NUMONLY:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:LETTERONLY:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:NONUM:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:NOLETTER:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:ZIP:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:PHONE:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:NOTBLANK:Field_name">
<INPUT TYPE=HIDDEN NAME="CHECK:SELECT:Field_name"
VALUE="...">
What happens if I use a directive name as the name of a Field?
The short story is that you shouldn't, since this is likely to cause Advanced
Form Mailer to behave in a way unfamiliar to you.
That being said, this allows you to use Advanced Form Mailer as an even
more powerful Form handling tool. It lets the user of your Form control
the way the script behind the Form behaves. In SOME environments that is a
very good thing. Usually though, that isn't what you want to let happen.