Creating Forms and E-mail
Getting Messages and Feedback from Your Visitors

If you'd like to provide a way for your visitors to send you messages or feedback from your web page, provide an E-mail link or create a form. Although you always should provide E-mail links on your page so visitors will have a quick and easy way to contact you, forms are more useful because they allow you to provide specific questions for your visitor to respond to.

With forms, you can give text areas for your visitors to write you comments and notes. You can ask questions and give possible responses, conduct polls, get feedback, and do much more.

When you create a fill-out form, you need some way to process the information on the form so that the results can be sent to you via e-mail. Form processing is typically done by a program called a CGI script. Prodigy has provided a CGI mail gateway script for members to use for processing forms. There are some special requirements for Prodigy's script, so be sure to read the notes following the general forms description so the script will work for you.

The tags listed below will allow you to create e-mail links and forms for PI pages, so that your visitors can contact you and provide feedback.
HTML Tag Attributes (options) Description
Creating a simple email link, using:
<A HREF="....">...</A>

mailto: The code here, when utilized in the <A HREF> tag, and included on your page, will provide a clickable link that will allow your visitors to send you an email response. To make this code work for you, change email_namein the example below to whatever your email ID is, and change the my emailto whatever you'd like your hypertext link to say.
tag: Send E-mail to: <A HREF="mailto: email_name@prodigy.net"> my email@prodigy.net</A>

display: Send E-mail to: my email@prodigy.net
FORM METHOD="post|get" Identifies the beginning and ending of the code that is used to created a feedback form. Requires an ending </FORM> tag.

The METHOD attribute defines the method used to submit a fill-out form to a query server. GET is the default METHOD. It causes the contents of a form to be appended to the URL mentioned in the ACTION attribute (discussed below). POST causes the form contents to be sent to the server in a data body rather than as part of the URL. POST is the METHOD you should use when using Prodigy's mail gateway.
ACTION="url" Specifies the URL of the CGI script that will be used to process your form.

A basic form



Radio buttons
Planes
Trains
Automobiles

Checkboxes
Planes
Trains
Automobiles

Copy and paste the contents of the box below to get the HTML code that created this form.

INPUT TYPE="text|checkbox|
radio|submit|reset|hidden"

NAME="symbolic_name"
VALUE="some_text"
Specifies the type of a fill-out element inside a FORM.

TYPE specifies the type of fill-out element to be displayed on your page. Each TYPE is discussed in more detail below.

NAME is used to assign a unique identifying name to each form element, and must be present for all INPUT TYPEs except SUBMIT and RESET.

The purpose of VALUE changes somewhat depending on the TYPE of fill-out element being used, and will be discussed in more detail for each INPUT TYPE listed below.
HIDDEN NAME="symbolic_name"
VALUE="some_text"
Identifies a piece of information that will not be displayed on your page, but will be sent to you in the body of your email when a form is processed. This INPUT TYPE is also used in some cases as a means of passing information to the CGI script that you're using to process your form (for example, what email address the form response is to be sent to, or the subject of the email).

NAME is used to assign a unique name to the form element, and can be any name of your choosing.

VALUE is used to give the form element a text value, which is then sent to you in the form response, or is used by the CGI script to gather the information required to process the response.

A HIDDEN form field

<INPUT NAME="subject" TYPE="HIDDEN" VALUE="Your Subject">


Notice how a HIDDEN form field does not display anything on a page.
TEXT NAME="symbolic_name"
VALUE="default_text"
SIZE="width|height"
Creates a text box where your visitors can enter a message or response. A text box has no scroll bar, so it's typically used for single line responses, while a TEXTAREA (see below) is used for larger, multiple-line responses.

NAME is used to assign a unique name to the text box, and can be any name of your choosing.

VALUE is an optional attribute that can be used to display a default message or response. If not specified, the text box will be blank until your visitor types something into it.

SIZE is an optional attribute that can be used to define the size of your text box in columns and rows. If not specified, the default text box size is 1 row by 20 columns.
A text box with default text "Some Text" and a size of 15 columns wide specified.

<INPUT TYPE="text" NAME="subject" SIZE=15 VALUE="Some Text">

CHECKBOX NAME="symbolic_name"
VALUE="some_text"
CHECKED
Specifies a list of responses that your visitor can select from. In a CHECKBOX , multiple responses can be selected from the options list you've provided.

NAME is required, is used to assign a unique name to the CHECKBOX , and can be any name of your choosing. Each of the possible choices you provide within a single CHECKBOX list should have the same NAME .

VALUE is required, and defines the text you will receive when a box is checked and the form is processed.

CHECKED specifies that a box(s) is to be checked by default.
A three option CHECKBOX with the middle option CHECKED as the default.

<INPUT TYPE="checkbox" NAME="check1" VALUE="planes"> Airplanes
<INPUT TYPE="checkbox" NAME="check1" VALUE="trains" CHECKED> Trains
<INPUT TYPE="checkbox" NAME="check1" VALUE="cars"> Automobiles
Airplanes
Trains
Automobiles

More than one item can be selected in a CHECKBOX .

NOTE: In this example, with the TRAINS box checked, the email response you receive for this fill-out form field will look something like      "check1=trains "

RADIO NAME="symbolic_name"
VALUE="some_text"
CHECKED
Specifies a list of response options your visitor can select from. In a RADIO selection area, only one selection can be chosen.

NAME , VALUE , and CHECKED act the same for RADIO buttons as they do for a CHECKBOX .
<INPUT TYPE="radio" NAME="radio1" VALUE="planes"> Airplanes
<INPUT TYPE="radio" NAME="radio1" VALUE="trains" CHECKED> Trains
<INPUT TYPE="radio" NAME="radio1" VALUE="cars"> Automobiles
Airplanes
Trains
Automobiles

Only one RADIO button can be selected at a time.
NOTE: In this example, with the TRAINS button checked, the email response you receive for this fill-out form field will look something like      "radio1=trains "
SELECT NAME="symbolic_name" SELECTED Creates a drop down list box, or a scrollable list box, depending on the attributes used. SELECT requires both a beginning and ending tag.

NAME is required and is used to assign a unique name to the form element, and can be any name of your choosing.

SELECTED identifies a default selection(s).
OPTION "some_text" Defines the items in a SELECT list that your visitors can choose from. Replace "some_text" with whatever you'd like your OPTION to say./font>< /font>< /font>< /font>< /font>
A SELECT list box with three options, and with the middle option SELECTED.

<SELECT NAME="select1">
<OPTION>Airplanes
<OPTION SELECTED>Trains
<OPTION>Automobiles
</SELECT>
SIZE=n An optional attribute that specifies how many OPTION items will be displayed, where n represents the number of items to display. If not specified, the SELECT list will displayed as a drop down list box. If specified with a number greater than 1, the list will be displayed as a scrolling list
The same SELECT list box as above, but with a SIZE=2 specified.

<SELECT NAME="select1" SIZE=2>
<OPTION>Airplanes
<OPTION SELECTED>Trains
<OPTION>Automobiles
</SELECT>
MULTIPLE An optional attribute that when used allows your visitor to select more than one list item to be selected. When specified, MULTIPLE causes the OPTION s to be displayed as a scrolled list rather than as a drop down list.
Same as above with MULTIPLE specified.

<SELECT NAME="select1" SIZE=2 MULTIPLE> <OPTION>Airplanes
<OPTION SELECTED>Trains
<OPTION>Automobiles
</SELECT>
TEXTAREA NAME="symbolic_name"
ROWS=n
COLS=n
Defines a text box with scrollbars that allows for a multiple line response so that your visitors can send you comments and messages. Requires both a beginning and ending tag. Any text between the beginning and ending TEXTAREA will show up as the default text in the text box.

NAME is requires and is used to assign a unique name to the form element, and can be any name of your choosing.

ROWS specifies the width of the text box, where n represents the number of characters wide the box is to be.

COLS specifies the height of the text box, where n represents the number of characters high the box is to be.

A TEXTAREA 25 characters wide and 7 lines high with some default text.

<TEXTAREA NAME="text2" COLS=25 ROWS=7>
Your default text goes here.
</TEXTAREA>

SUBMIT VALUE="button_text" Creates a button that, when clicked on, sends the contents of the fill-out form for processing to the CGI script specified in the FORM ACTION , and then sends the results to you via email.

VALUE identifies what your button should say.
<INPUT TYPE="submit" VALUE="Send it!">

RESET VALUE="button_text" Creates a button that, when clicked on, clears the contents of the fill-out form so that your visitor can start over if they make mistakes.

VALUE identifies what your button should say.
<INPUT TYPE="reset" VALUE="Start Over">


Now for the special rules for Prodigy's form. Every form must have a "to" field for sending the responses. The "to" field must be to a valid email address at prodigy.net, prodigy.com, sbcglobal.net, wans.net, or flash.net (so that only Prodigy members may set up the form). Every field also needs a valid "from" field to show where the response is coming from. Since some people filling in a form leave out their email addresses or don't put them in properly, I suggest using a hidden field with your own email address for this field, so that you know it's always present when the form is submitted. Use a different form element (say, "sender") for the person filling out the field to give an email address. Finally, Prodigy's script will show a default "form submitted" page after the form is sent if everything is OK. If you want to set up your own page to show after the form is sent, or if you want to show one of your existing pages, just use the "nexturl" field. As an example, using my own address and one of my favorite sites, here are the required three lines of code:
<INPUT TYPE="HIDDEN" NAME="to" VALUE="jeffrey@prodigy.net">
<INPUT TYPE="HIDDEN" NAME="from" VALUE="jeffrey@prodigy.net" >
<INPUT TYPE="HIDDEN" NAME="nexturl" VALUE="http://computing.bb.prodigy.net/">
You can see an example of a working form using the Prodigy script here:

http://pages.prodigy.net/jeffrey/formtest.html/

counter

© 2001 Jeffrey L. Needleman. All rights reserved.