![]() | WCS: Forms on web.mit.edu |
This document (http://web.mit.edu/cwis/docs/comments-doc.html) presents quick instructions for making forms that are sent as email using the server web.mit.edu. It assumes you have access to an Athena account to generate the first form.
If all you want to do is to generate a simple e-mail comments form (sample here), you need only follow steps 2, 7, and 9.
For more general information about how forms work on web.mit.edu, please see the Forms FAQ.
Quick Guide compiled at MIT
NCSA's
fill-out-form guide (more detailed information) is at
http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html
This is going to be the biggest part of the work. You need to know how to write forms in HTML, knowing about INPUT, NAME, VALUE, etc. See Pay special attention to the examples at the bottom of the page.
On Athena, change to the directory where you want to put your comment form (the directory where you store WWW .html files) and type:
add cwis
mkcmtform [ emailaddress [ basefilename ] ]
This will create files comments.html and comments.txt. Read more documentation (the man page) on mkcmtform.
* If you already have an HTML form, or plan on using the comment replies with a database or spreadsheet, see step 11.
Look at the the file comments.txt. Be very careful when modifying it, because your form won't work at all if you mess up. Change the address in the "To" field.
You'll notice that some of the inputs in comments.html have names that start with "required-". If these inputs aren't filled in, the form is rejected. Other inputs are optional. Look at comments.txt to see where these inputs appear in the processed message that gets emailed to you.
Using the skills you learned in step 1, start adding inputs to comments.html. Then add the corresponding "[inputname]" where you want it to appear in comments.txt. This works for checkboxes, etc., not just regular text inputs. You can create new inputs that start with "required-" if you want forms to be rejected if those inputs are blank. You can also remove the "required-" from existing inputs to make them optional. Just be sure to change both the .html and the .txt file.
Try out the form in your favorite WWW browser. If one of your inputs isn't showing up, make sure you typed it exactly the same in comments.html and comments.txt.
<a href="comments.html">comments</A>
Try your new form to make sure it does what you want it to do.
Since mkcmtform creates an "Errors-to" line with your email address on it, you will receive a copy of any bounced mail sent via your form. If a problem with your form is causing mail to bounce, make sure all of the header information (particularly the "To:" and "CC:" lines) are correct.
You may want to include the information gathered from a form in a database or spreadsheet program. MIT has developed advanced scripts to simplify this process.
If you run your own web server and would like to see the CGI program in C that serves all forms-to-email needs, see the cgiemail page.
Now you're ready to point people at your comments form. There are two other faq pages that you may find useful after creating your first comment form. One is on some advanced scripts that you can use to process comment forms and the other is a general overview of how forms work on Athena.