The NAME attribute sets the variable name, and the VALUE attribute (if it exists) sets the value.
In Netscape forms elements are scaled relative to the size of the user's fixed width font.
A future section will show how this form can be made Section 508 accessible.
You can write a CGI application from scratch, in fact there are notes from an NTC class on how to do this. But it can be more time-effective to use someone else's code.
One very helpful library for forms is the perl-5 CGI package. There is an book, "Official Guide to Programming with CGI.pm", by Lincoln Stein available on the use of this package. This program can create a form, parse the input from the form and display and/or save the results with relatively little coding.
A generic form processing program, process_form, has been installed on water.usgs.gov. If having form results mailed to you is sufficient you can use the program there, if you would like to save the results to a file, contact David Boldt (dboldt@usgs.gov), for a copy of the program to install at your own site. (Research is needed to find a generic tool of this sort for USGS use!)
A
sample Registration form
is availableoffline, along with the
CGI code that produces it (using the perl-5 CGI package).
Safe CGI Programming using perl; Security guidelines for perl CGI programming.
slide 48
Lab Exercise on Creating Forms
|
"Mastering a Web Site" online course Created and maintained by Lorna Schmid and David Boldt. http://water.usgs.gov/usgs/training/webmaster/forms-writing.html Last modified: Fri Dec 9 17:47:21 EST 2005 |