When using PonyExpress you will include some additional information about your form using “hidden” tags. These are actually <INPUT> tags of TYPE=”hidden”, each with a unique NAME and, in most cases, a VALUE. It is a good habit to add all your hidden tags immediately after your opening FORM tag, as this makes it easier to access these tags and troubleshoot problems with your form. Here’s an example segment:

<form method="post" action="/htbin/ponyexpress2">
Note: If your form lives on people.bu.edu use “/cgi-bin/ponyexpress2″ in place of “/htbin/ponyexpress2″ as shown above.
<input type="hidden" name="to" value="someone@bu.edu">
<input type="hidden" name="form_location" value="/somesite/comments/">
<input type="hidden" name="return" value="thankyou.html">
<input type="hidden" name="output" value="index.html">
<input type="hidden" name="required" value="lastname, firstname, email, comments">
<input type="hidden" name="mail_to_admin" value="yes">
<input type="hidden" name="mail_to_visitor" value="yes">
<input type="hidden" name="timestamp" value="!date">
...

There is one variable which is never hidden: the “email” (or “email_address”) variable. This variable is used when you send reply emails to visitors, and so should be of type “text,” to allow visitors to supply their own addresses.

It is also important that the email field be required. If a visitor to your site does not provide a valid email address, then mail from the form will arrive from PonyExpress@bu.edu instead of from the visitor’s email address. Without their email address, you might have no way to contact them.

The following table shows some of the tags used by PonyExpress forms. Depending on what your form does, you may only need a few of these in your form. Those that are required are shown in black.

Special Tags for PonyExpress Forms

Tag NAME

How to Use

Sample Tag VALUE

General

to

Replace with one or more email addresses in a comma-separated list. This is the address where admin email will be sent. someone@bu.edu
Note that non-BU addresses must be registered first with PonyExpress.

form_location

(required if using template files or writing to database files)

Replace with the path to your output files and/or templates, starting with your site directory name. This can be a different directory than the one in which your form resides. Opening and closing slashes are optional. yoursite/subdir/forms
or
/somesite/comments/

return

Replace with the URL of a page to display after a visitor completes the form. With guestbooks, this could be the actual guestbook page. /mysite/subdir/thankyou.html
or
thankyou.html
Note that relative URLs are relative to your “form_location” variable, not necessarily to the form itself.

required

List the fields you require the visitor to fill out. firstname, lastname, comments

order

List the order in which form fields should be output in unformatted emails or database files. Fields not listed here will be output alphabetically after any given in this field. firstname, lastname, email, comments

timestamp

Provide a format for timestamping entries. See Date and Time Variables. !time, !date

$ANYTHING

Generically include HTTP environment variables in the output. See Environment Variables. $REMOTE_HOST

DEBUG

Set this to “yes” to have all the form data output right back to the browser. This is useful in troubleshooting problems with your form. yes

majordomo_subscribe

Subscribe the email address entered into the “email” text field to your BU majordomo mailing list. my-bu-mailinglist-l

majordomo_unsubscribe

Unsubscribe the email address entered into the “email” text field to your BU majordomo mailing list. my-bu-mailinglist-l