
Form Mail
Online forms that can reply by email
[ Back to the Gadget List ] [ Example ]
This gadget allows you to setup order forms, feed-back forms and the
like. The data from the form is e-mailed to the address that you
specify.
The following is a definition of the elements envlolved in a feed-back form...
- The <FORM ACTION=...>
- This field specifies where the form values get sent by the
browser. We set this as follows:
<FORM ACTION="/cgi-bin/mail" METHOD="POST">
- The recipient value:
- The purpose of this script is to convert a form to e-mail, which
means that we need to have an e-mail address to send the results to.
We do that with a hidden field as follows:
<input Name="recipient" type="hidden"
value="yourid@your.mailhost">
Those are the only mandatory fields. The following
predefined fields are optional, but add significantly to the value
of the form. Any other fields that you define are automatically sent
to you in the e-mail message.
- Subject:
- We specify the subject of the mail message with a hidden field
using a line like the following:
<input Name="subject"
type="hidden" value="formmail demo">
- Redirect:
- This is another hidden field that is used to specify a URL that
the client browser should go to after submitting the form. Usually
this would be a thank you note of some type (Note that this has to be
fully qualified, as the default directory is /cgi-bin during the redirect.)
<input Name="redirect"
type="hidden" value="/gadgets/formmail/thanks.html">
- Username:
- We might give the client a field to enter their e-mail ID. This
will be used as a return address for the message you get.
<input Name="username" type="text" size=40>
- Realname:
- We might give the client a field to enter their real name (as
compared to their e-mail id). This will also be used in the return
address you received.
<input Name="realname" type="text" size=40>
[ Back to the Gadget List ] [ Example ]
Copyright © 1996, ComeVisit.com
Last Updated: Wednesday, 11-Mar-1998 15:30:06 PST
Questions/Comments support@comevisit.com
Access Count: 22379