General comments
So far you have created a form you can see and added code to make it accessible to persons using screen readers. For the form to actually work, you need to have a script associated with the form that tells the computer (the AgServer in this case) what to do with the information submitted through the form. Some web servers are set up so that data entered into a form on the screen goes directly into a database program, but on the AgServer this only happens if you are working with Oracle, a very complex database program with a steep learning curve.
ECAT purchased a script several years ago called Formhandler. By copyright regulations, we can legally allow anyone with a site on the AgServer to use this program, but we cannot allow others who have websites on other system use the same program.
Formhandler is a general script, not a specific script created to work with just ONE form. Therefore, you have to provide information to Formhandler about your form, how many fields it has, and tell it exactly what to do with the information submitted to the form.
The lessons for Week Three deal with what you need to do if you want email feedback. Week Four will address how to get information into a file which you can bring into a spreadsheet or database program. You have to import the data. It does not automatically go into the other program.
For Week Three, you will have to make some changes to the form you have created so far. You also have to create some additional files that Formhandler needs.
Adding the reference to the script
The first thing you need to do is to reference the script. Split your screen so that part of it is showing the design mode and part showing the HTML coding. Now click at the top of the form, where the dotted red line appears. Look for the code that turns on the form. It will look something like this:
<form name="form1" method="post" action="">
You need to change this line so it reads:
<form action="/cgi-bin/formhandler/formhandler.cgi" method="post">
This is a reference to the script or program which will make your form work. Save your form to save this addition to the form.
Although you do not need to change the ending tag for the form, move to the bottom of the form, where you see the bottom red line in the design screen, and you should see this code there that turns off the form:
</form>
You do not have to change this coding.
Decisions about outputs
Formhandler is limited in what it can do. You can have information posted in some or all of the fields in your form be mailed to one or more persons. This is what we are covering this week.
You can also decide to have information posted in some of all of the fields in your form be recorded into a comma delimited datafile in your folder on the AgServer. You would then peridiocally pull off this datafile and bring the information into a spreadsheet program or a database program. We will covering in another lesson.
Decisions about additional files
There are expected files that Formhandler is expecting to find in your folder on the AgServer. How many files you create will depend on your form and what you are doing. These are files you need to deal with email output.
| success_html_template You create your own filename |
this will be the web document that is shown to the user after they click on the submit button on your form |
| email_template You create your own filename |
this is a plain ASCII text layout for getting responses as an email message |
| error_html_template You create your own filename |
this is the web document that is shown to the user if they try to submit a form in which a required field is missing; if you do not have required fields, this file is not needed |
You need to decide where on your site these files will be put and create that folder area on the server. If you have many forms on your site, or plan to have many forms, you could put each form in its own folder. Or you could put all your forms in one folder. It does not matter where the main form and its associated files go. You just need to know where they will be going, because you have to tell Formhandler exactly where they are.
These are examples of real filenames I have used for a form I created.
| message.html | this is the name of the main form itself |
| message-success.html | This is the success message after the form is submitted. |
| message-error.html | This is the document if required fields are left blank. |
| message-email.html | This is a layout for sending email messages back to the recipient. |
Adding the hidden field references
The last step is to add HIDDEN fields/statements at the bottom of your form. These are needed by Formhandler. These are typed in using the HTML screen, and you need to be sure you are before the </form> code.

These lines are described in other lessons.
This document is part of a set of tutorials related to putting a form on your website. The initial page is found at cals.arizona.edu/ecat/forms/olderforms.html