Using a form to send information

This is an example of a simple form used used to send information. It does not have any 'form checking', that is, if no information is entered and the form is just sent, then it will not complain and ask for e-mail addresses, etc. You can always find the e-mail address from the e-mail anyway. If you wished to prevent the user sending the form until all the information you require is included, then you would java script or cgi to validate the form. This form uses a simple POST to work.

You can enter some values and click on the submit button. The form will be put in your e-mail client's SEND folder. You can then look at it and then delete it. Do not send it to me! Use my feedback form for that!

You have already learned about forms. The only points about this one are as follows:

  1. The method is post

  2. The action is mailto:me@my.com?SUBJECT='Sent from my form' > Which enters some text in the subject line of the e-mail.

  3. The enctype is "text/plain" This formats the text so you don't get one word after another.

  4. The form elements are named in a way I can understand them - that is, not B1, T3, etc! So the name box is called NAMER.

This is a very simple form that anyone can put on their website to get feedback.

 

Name:
Address
Telephone
e-mail
Additional
Send Further Information:

 

Copy of the code for the form above

<form method=" post " enctype=" text/plain " action=" mailto:me@my.com?subject='Sent from my form' ">

<table border=" 0 " cellpadding=" 5 " cellspacing=" 0 " width=" 573 ">

<tr>

<td width=" 190 ">

Name:

</td>

<td width=" 363 ">

<input type=" text " name=" Namer " size=" 20 " />

</td>

</tr>

<tr>

<td width=" 190 ">

Address

</td>

<td width=" 363 ">

<input type=" text " name=" Address " size=" 20 " />

</td>

</tr>

<tr>

<td width=" 190 ">

Telephone

</td>

<td width=" 363 ">

<input type=" text " name=" Telephone " size=" 20 " />

</td>

</tr>

<tr>

<td width=" 190 ">

Additional

</td>

<td width=" 363 ">

<select name=" Choicer " size=" 1 ">

<option value=" Fish ">

Fish

</option>

<option value=" Chips ">

Chips

</option>

<option value=" Vinegar ">

Vinegar

</option>

<option selected value=" ChooseHere ">

Choose Here

</option>

</select>

</td>

</tr>

<tr>

<td width=" 190 ">

Send Further Information:

</td>

<td width=" 363 ">

<input type=" checkbox " name=" Send further information " value=" ON " checked />

</td>

</tr>

</table>

<p>

<input type=" submit " value=" Submit " name=" B1 " />

<input type=" reset " value=" Reset " name=" B2 " />

</p>

<textarea rows=" 3 " name=" Comments: " cols=" 44 ">

Comments

</textarea>

</p>

</form>



[back to:  Buttons, etc ][ home ][ contents ]


Most Recent Revision: 26-Oct-99.
Copyright 1999

I am always pleased to hear from you.
Send your comments to
and please visit: New Life Course