
CWIS formparse program for using e-mail forms: Formparse.pl
The formparse program lets the end user fill in a form and mail the values
to a specified e-mail account. To use it:
- Create a web page with a form on it. A sample form can be found on the
Form Parse Sample
Page.
FORM METHOD=POST ACTION="http://www.unl.edu/cgi-bin/formparse"
INPUT TYPE="hidden" NAME="whither" VALUE="YourE-mail@unl.edu"
INPUT TYPE="hidden" NAME="whence" VALUE="Your
Website Here"
INPUT TYPE="hidden" NAME="subjectline" VALUE="Response
to Web Page"
INPUT TYPE="hidden" NAME="thanks" VALUE="Your
submission has been sent. Thank you for participating!"
- Copy the above 6 lines exactly into the body of your page, changing only
the italized text in the quoted strings following VALUE= :
whither - This is the e-mail address where you send the information.
whence - This is what the mailer requires as the return address. We don't
have one, so enter the name of your website.
subjectline - This is the subject line that will appear in the e-mail.
thanks - This is the text that will be printed to the end user's screen when
the form has been submitted.
- After these six lines, there are two more, as follows:
INPUT TYPE="hidden" NAME="thanksfile" VALUE="/cwis/data/(account
name)/thanks.html"
These lines are optional, and are used if you want to send the user to your
own html thank-you file after
the form has been submitted. Replace the VALUE of thanksfile with the Unix
pathname of your html file.
- One of the buttons on your form must allow the user to submit it. It should
look similar to this:
INPUT TYPE="submit" VALUE="Press to submit"
(Replace the VALUE with text of your choosing.)
It is also nice to have a Reset button, which allows the user to clear the
form to its default values.
INPUT TYPE="reset" VALUE="Reset"
- Terminate the form with the tag: /FORM
The first time you use your form, you will get a message asking if you
want to be receiving messages from formparse in your mailbox. This courtesy
is in use in case someone decides to set up a form soliciting feedback and
then sends the responses to another person. For example, someone might decide
to set up a form soliciting feedback on administrative handling of the UNL
parking situation and enters the Chancellor's personal e-mail address as the "whither" value.
Return to the CWIS homepage.
© June 9, 2004 • University
of Nebraska-Lincoln • Send comments
or questions to cwis3@unl.edu.