Texas State University
 
adjust type sizemake font smallermake font largerreset font size

How to Create a Form for a Webpage

About Forms

Web forms let your users fill out information on a web page and then hit a submit button to send that info back to the web server. That information is then manipulated by a script or program on the server. These scripts are usually written in a programming language called PERL and are called "CGI scripts". This particular script is available for you to use and resides on Information Technology's web server. It will manipulate the information your form sends it, and then send you back the information in e-mail.

You can create a form anywhere inside any web page. You can write several paragraphs of information and then start the form, or make the form a separate web page entirely. In either case you will need to enclose the form within the <form></form> tags to get the form elements to work. The following is an example of a very small, but complete form's code in HTML:

<form action="http://apps.its.txstate.edu/formemailer.pl" method="post">
<input type="hidden" name="destinationemail" value="me@txstate.edu, someone@isp.com">
<input type="hidden" name="thankyoupage" value="http://www.txstate.edu/webmaster/thankyou.html">
Enter Your Name Here: <input type="text" name="SenderName" maxlength="30"><br>
Enter Your Email Address Here: <input type="text" name="SenderEmail" maxlength="30">
<P><textarea name="message" cols="40" rows="3" wrap="soft">Type your message here.</textarea>
<P><input type="submit" value="submit" width="50" width="10">
<input type="Reset">
</form>


The above HTML would create this:

Enter Your Name Here:
Enter Your Email Address Here:

First Step, Start a Form...