Your Name:
This can be produced by using the following code:
Your Name:<INPUT TYPE=TEXT NAME="My Name" SIZE=20 MAXLENGTH=80>
Confidential Fields
Where "SIZE" relates to the visible area of the field in characters and "MAXLENGTH"
relates to the maximum number of allowed characters in the field.
This can be produced by using the following code:
Your Password: <INPUT TYPE=PASSWORD NAME="My Password" SIZE=20 MAXLENGTH=80>
Text Areas
Text areas are generally good for peoples comments.
This can be produced by using the following code:
<TEXTAREA ROWS=4 COLS=35 NAME="General Comments">
</TEXTAREA>
Example Use Of Form-Mail
Here is the code used in the example on the previous page. Copy and paste this code into a blank document and upload it to your webspace and test how it works.
<HTML><example form-mail page>
<HEAD>
<TITLE>Example Of form-mail Design
</TITLE>
</HEAD>>
<BODY> >
<H1 align=center>
Example Of A Simple form-mail Design
</H1>
<hr width=60%>
<P>
<H3>
Please enter the following details:
</H3>
<FORM METHOD="POST" ACTION="http://home.freeuk.net/cgi-bin/formmail">
<INPUT TYPE=HIDDEN NAME="from" VALUE="web page form">
<INPUT TYPE=HIDDEN NAME="email" VALUE="username@freeuk.com">
<INPUT TYPE=HIDDEN NAME="realname" VALUE="Web Response">
<INPUT TYPE=HIDDEN NAME="subject" VALUE="Web feedback">
<INPUT TYPE=HIDDEN NAME="redirect" VALUE="http://home.freeuk.net/">
<INPUT TYPE=HIDDEN NAME="sort" VALUE="alphabetic">
<pre width=80>
Your Name:
<INPUT TYPE=TEXT SIZE=36 MAXLENGTH=50 NAME="Visitors Name">
<br>
Your Email Address:
<INPUT TYPE=TEXT SIZE=36 MAXLENGTH=50 NAME="Email Address">
<br>
Do You Like What You See?
<INPUT TYPE=CHECKBOX NAME="Service Appreciated" VALUE="Yes"> Yes
<INPUT TYPE=CHECKBOX NAME="Service Needs Improving" VALUE="Yes"> No
<INPUT TYPE=CHECKBOX NAME="More Information Needed" VALUE="Yes"> I
Need To see More
<br>
Any Other Details I Should Know...
<TEXTAREA ROWS=8 COLS=40 NAME="Other Details">
</TEXTAREA>
<CENTER>
<INPUT TYPE="SUBMIT" VALUE="Send Me"><INPUT TYPE="RESET"
VALUE="Clear Me">
</CENTER>
</pre>
</FORM>
</P>
<hr width=60%>
</BODY>
</HTML>
Standard Elements Of The Form Tag
Here are most of the standard elements that you can use within a form.
Name Type
VALUE Field Definition
subject
This is the text that will appear in the 'subject' field of the resultant
response.
email
This is the text that will appear in the 'from' field of the resultant response.
realname
This is amended to the above 'email' field.
redirect
This is the location of the URL (Web Page) to which the browser will be taken after submission of the form.
required
Use this if you require certain fields to be filled in
e.g. <INPUT TYPE=HIDDEN
NAME="required" VALUE="email,phone">
missing_fields_redirect
This is the URL where people will be taken if they do not fill in a 'required' field. This is optional.
sort
This defines the order in which the information is presented on the resultant
response. The options are:
VALUE="alphabetic" - Gives an alphabetic sort of names
VALUE="order:name1,name2,name3..." - Ordered response.