Online forms require a cgi script to E-Mail you the results.
As of February 1999, our Virtual Servers have a script called formcgi
installed by default; ready to use.
The use of formcgi is free with your Virtual Web server.
NOTE: If you were moved from an older Virtual Web
server and do not have formcgi in your cgi directory, E-Mail domainsupport@core.com and we'll be happy to
install it for you.
Quick start instructions:
To use formcgi, there are only two tags required in your form. Add the following html tag as the form ACTION line in your form.html:
Under that, add this line, it tells the form who to mail the form results
to:
That is all that formcgi requires. However, there are more in-depth features
that you can use with formcgi, we will go into those below.
Introduction
This program E-Mails you the data that a user fills out on an HTML form.
You can let the program display a simple confirmation page, or you can
design your own echo page, with all the usual Web page design elements that
you want to use. Alternatively, you can redirect the user to a page on another
server, as soon as the form is submitted.
Usage
To use the program, edit the "action=" part of the <form> tag
on your HTML page, like this:
Script Control Variables
To tell the program what to do, you can include any of several script
control variables anywhere between the <form> and </form>
tags. They're all optional, except "to."
These variables are case sensitive. The "to," "subject" and
"email" fields are all lowercase letters, for compatibility with
the earlier program.
Mailing the Data
"to"
First, put your E-Mail address in the "to" field, so the program
can mail the data to you.
You can mail the data to more than one address, like this.
If you want to do everything as simply as possible, you can stop reading
right now, because "to" is the only script control field you really need.
"cc"
Another way to mail the results to more than one person is to use the "cc"
field. Addresses in "cc" won't appear as mailto links on the standard echo
page.
"subject"
The standard subject is "Web Form Data," when the program mails you the data
from the form. You can change it like this.
Standard Echo Page
When the user submits the data, the program displays a page confirming the
data that the user filled out. If the form includes an "email" field and the
user filled it out, it also mails a duplicate copy of the data to the user.
"ReturnLinkURL"
"ReturnLinkTitle"
The standard echo page includes a link back to the form, with the
title "Return to the Form." You can substitute a link to any page
you want, like this.
"MailToAddress"
"MailtoName"
"MailtoPrompt"
If you want to display a different mailto link on the standard
echo page, instead of the address to which the program sends the
data, you can do it like this.
The standard prompt for the mailto link is "Questions:" but
you can change that too, with this line:
Your Own Echo Page
The standard echo page is XMPtty generic. If you want to say
something specific to the user, or display a nicer looking page
when the user submits the data, you can define your own echo
page.
"EchoFilePath"
Vlogin is your virtual server login name. You can design your echo page however you like. You'll have to
include your own mailto and return links, because the script
control variables for the standard echo page (above) can't write
those links to your echo page.
You can use either .html or .htm as a file extension for your
echo page. For security reasons, the program won't read files
with anything other than these HTML file extensions. In other
words, if a file has world-readable file permissions and is an
HTML file, it must be okay to display it, but otherwise it isn't.
You also can't use any file path that starts with a dot (.)
If you want the program to display the user's input data on your
echo page, include the following comment line in the file, where
you want the user data to appear.
<!--ECHO DATA HERE-->
Redirection to Another Page
"RedirectURL"
To display a page on another server as an echo page, you can use the
RedirectURL variable. It's not possible to echo user data from the form onto
a redirected page.
If the page is on your server, you can shorten this to a relative URL.
User Data Fields
"Required"
This script control variable can apply to any of the data fields that the
user fills out. You can refuse to accept the form unless the user puts
something (anything) in certain fields. With a generic program like this,
it's difficult to validate the input data from completely random and unknown
fields. So we don't. (We could make a stab at it for numeric fields, but it
wouldn't be XMPtty for alphabetic or alphanumeric fields.) So the user
could enter, for example, "qwerty" and the program would accept it.
It's a good idea to use required fields sparingly. Users dislike them,
especially if they ask for "none of your beeswax" information. Ask yourself,
"Would the data be completely and utterly useless without this field, or
not?"
"email"
This is the user's E-Mail address. It's the only user data field
with a specific name (and it's case sensitive). You can make this
a required field or not, as you like. But if it's on the form and
the user fills it out, then the program checks to make sure it
has a valid E-Mail address format, because the program uses it to
send a duplicate copy of the data to the user. If it's not in the
right format, the program notifies the user.
You can include any other data fields, and name them whatever you
want. The program includes the name and contents of each field in
the E-Mail that it sends you.
Referrer Check
For security reasons, the program compares the IP address of the
server that submitted the form against a list of allowable servers. In
this case, the list is extremely short. If the form isn't hosted
on this server, the program won't even read the input from it.