Create a form so that someone visiting your warp website can send you a message without knowing your email address.
Your form will use the CGI
program located at the following URL:
http://www.cs.hamilton.edu/~brosmait/cgi-bin/warp-contact.cgi
Details about how to use this program are given in the next section.
An API is an Application Programming Interface. Roughly, an interface is protocol for communicating with a program you want to use. In order for the program to do what you want, it expects you to pass data to it in a certain way; the API tells you how to do this.
The warp-contact.cgi API is very simple. It expects to see all of the following fields as the result of a post method. (Note: The name of each field is case-sensitive).
Any other fields on your form are ignored.
The warp-contact.cgi program will read the submitted data from your form and generate a response HTML page that will be displayed in your browser. The response page will indicate success or that a problem occurred. If it indicates success, an email was sent to your hamilton.edu address containing the information supplied by the form user; if it indicates that a problem occurred, it will contain a detailed error message (or messages) explaining the problem.
There are two types of error messages.
Use the accessibility features we've discussed in class in creating your form (e.g., all inputs should be labeled). Use whatever form controls make sense (e.g., you might want to make the ‘subject’ field a selection box or radio buttons—or even be hidden; this would be useful if you want to filter your incoming email according to its subject field).
Feel free to make multiple form pages if you want to try out different options.
Create your contact form webpage in your hw directory. Put a link to it on your warp homepage.
[ Return to the CPSCI 107 homepage ]
Brian J. Rosmaita <contact me>