|
If you already have a working
form using eform.cgi, but want to see what else you
can do with your form, read on.
If your form has some fields that
your want the user to be required to fill in, the
eform.cgi script can check the user results and report
an error if a required field is empty.
To accomplish this, your form
element name will need to have a "switch"
attached to it. A switch is simply an additional letter
and underscore added to your form element name. For
example, if the name a field is "email"
but you want this field to be required, then name
the field "r_email" in your form and when
used in email.txt. The script knows that any field
with a "r_" in front of it is a required
field and will give the user an error message if it
is left empty. Here is the list of all the eform.cgi
switches and what they do.
|
r_
|
This field is
required. May not be left empty |
|
e_
|
Field must be
a valid email address |
|
d_
|
Field may only
contain digits or a decimal point |
|
c_
|
Field may only
contain digits, a decimal point or dollar sign |
|
w_
|
No special characters
allowed, letters and numbers only |
|
m_
|
Field may hold
multiple values (useful with checkboxes) |
|
n_
|
Any return or
enter characters will be removed |
|
s_
|
Leading or ending
whitespace will be removed |
Due to an underscore being a "switch"
character, do not use an underscore in your form element
names, unless actually using a switch. Only use an
underscore in your field name if you are using a switch.
If you still have any questions
about Brown's form processing, send your questions
to Webpublishing@brown.edu.
|