Welcome to the generic CGI processor

The basic functionality of this program is to take input from a form on a web page and return it to a designated user via email. There are some basic sanity checks available, but nothing too fancy.

Here's what you need to add to your form to use generic.pl:

<FORM method="POST" action="/bin/generic.pl">
<INPUT type="hidden" name="to" value="SomeEmailAddress">
...
</FORM>
That's it. Put some input values in the place where I put the ellipsis and you have a basic way to get things back.

Now, there are several optional fields which you may add. They all take the same form as the "to" field above:

<INPUT type="hidden" name="FieldName" value="SomeValue">
The field names and uses are:
subject What you want to appear in the Subject: line of the generated email. Note that you can put form variables in this by saying $foo where "foo" is the name of a field somewhere in the filled out form. If you use variables, make sure that your field names contain only lower-case letters.
replyto The value for a Reply-To: header to be inserted into the generated email. Like the subject field above, you can put form variables in this field by using $foo where "foo" is the name of a field somewhere in the form.
cc The value for a Cc: header to be inserted into the generated email. Like the replyto field above, you can put form variables in this field by using $foo where "foo" is the name of a field somewhere in the form.
from What should appear in the From: line of the generated email. Also, errors in e-mail delivery will be sent back to this address.
required A space or comma seperated list of fields that must have a value provided. If you use a comma anywhere in the list it will assume the whole list is comma seperated then you can have spaces in the names of your fields. If you opt for a space seperated list you cannot (obviously) have spaces in the names of your fields (it will break them into two field names)
redirect A URL to redirect the viewers browser to when they have successfully filled out the form. May be relative or absolute.
sortorder A comma or space seperated list of fields (see "required" above) that says what order things should appear in the email generated. If not provided the order in which things appear is essentially random (though generally consistant). If this field is use it must enumerate all fields that you wish to appear in the email. Anything not listed in sortorder will quietly be dropped. Debug mode (see below) will report on these dropped fields.
Also, a value of "-" for one of the fields will generate a dashed line in the generated email at that point. Useful for seperating sections.
debug Providing any value to this field turns on debugging. It's generally a good idea to turn it on once and check errors before you publish the form and after you make any changes. It does some sanity checks like seeing if you've left a field out of the sort order and stuff.
maillabels A comma or space separated list of text labels to use for each field in the email generated. A "sortorder" field must also be provided, and the order of the labels should be the same as the fields in sortorder. By default, the labels are the same as the form field names.
mailheader A short bit of text you want to appear in the generated email before the form data.
mailfooter A short bit of text you want to appear in the generated email after the form data.
nonulls If any value is provided for this null fields (those without any value filled in) will not be placed in the generated email.
moreinfo This tags some more info about such things as the originating machine, the broswer they were using and such into the email.
grouping_(.+) This tag is a little complicated. If you have several fields in the original form (such as a hour and minute for an event) you probably don't want them reported in the email each seperately. Instead you would like to "group" them. The following examples should demonstrate how this is done:

    <input type=hidden name=grouping_starttime value="starthour,:,startmin">
This would remove the fields "starthour" and "startmin" and replace them with the new field "starttime" which would look like "starthour:startmin". If you wish to use a comma for your seperator use a null seperator:
    <input...value="foo,,bar">
Note: Comma's will always be followed by a space.
Note: Seperators need not be single characters.
sendcopy This is an optional visible field the user can fill out to send a copy of the raw request data to the user. It essentially adds what ever the user fills in to the end of you "to" field
userid This field can't be set, but is available for substitution in other fields. It is the username of the validated user if authorization is required.
That should get your started. If you have questions, comments, gripes, bug reports or enhancement requests please direct them to the WITS helpdesk <wits@willamette.edu>.