Click here to return to Newclient Main Help Page


Back


Last Updated: June 01, 1998

Simple Comments Form

A web site wouldn't be complete without some simple method of sending comments or requesting information. A small form and simple CGI can be designed to facilitate such a task. The comments form and CGI source are presented in two sections below.

  1. The HTML source for the comments form
  2. Installing the CGI source code


HTML Source for the Comments Form

The HTML source below represents a simple comments form. This form can be customized for your Virtual Server by simply changing the occurrences of the email address (shown in bold) to the address that you would like to use in the form. It may be necessary to add an e-mail alias or e-mail mailbox if you use an e-mail address that does not currently exist on your Virtual Server. Please refer to the Virtual Server Handbook for information about creating e-mail aliases and e-mail mailboxes. Or simply use the iRoot Utility to interactively create the e-mail alias or e-mail mailbox.

<html> 
<head> 
<title>Send Comments / Request Information</title> 
</head> 
<body> 
<h3>Send Comments / Request Information</h3> 
<hr> 
<p> Feel free to send us your comments, suggestions, and/or
 questions. We value your input and desire to make these pages
 as useful as possible. Please leave an E-mail address so we can
 reply to you.
 <p> If your web client supports the "mailto" URL, 
you can use your 
<A HREF="mailto:email-address@your-domain.name.">
local mail app</a> to compose and send a mail message.
 Otherwise, you can use the form below.
<p> For those using browsers that do not support forms 
such as this, send mail to: <em>
email-address@your-domain.name</em> 
<p> <hr> 
<form method="POST" action="/cgi-bin/library/comments/comments.pl">
<input name="recipient" type="hidden" value="email-address@your-domain.name"> 
<font size="+1">Your Full Name:</font>
<br> <input name="name" size=50> 
<p> <font size="+1">Your E-mail address:</font><br> 
<input name="email" size=50> 
<p> <font size="+1">The Subject of Your Message:
</font><br> <input name="subject" size=50> 
<p> <font size="+1">Your comments, suggestions, and/or
 questions:</font><br> 
<textarea wrap=physical name="comments" rows=8
 cols=50></textarea> 
<p> <input type="submit" value="Send comments"> 
<input type="reset" value="Clear"> <p> </form>
 <hr> </body> </html> 

The form shown above represents the minimum amount of information that a comments form should contain- namely "recipient, name, email, subject, and comments". Other information can be added to the form above.... this information will also be sent to the "recipient" specified.

If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, the following URL is an excellent resource:

http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html


How to Install the Comments CGI

To install the comments CGI on your Virtual Server you will need to do the following:

  1. Download the Comments Form
    You will need to download the Comments Form HTML source and store it somewhere in your "usr/local/etc/httpd/htdocs" directory structure. Feel free to customize the form, add graphics, etc. But be sure that the variable name for each input field is not altered.

  2. Untar the Simple Comments CGI source code
    1. telnet or SSH to your Virtual Server.
    2. change directories to your home directory (type "cd" and hit return)
    3. type "tar -xvf /usr/local/contrib/comments.tar"
      This will install the comments.pl and util.pl files into your "www/cgi-bin/library/comments" directory.

  3. Customize the Appearance of the Comments CGI
    Two subroutines in the util.pl file are used to print out header and footer information. These functions are print_header_info and print_footer_info. Feel free to modify these functions such that the CGI outputs pages that are in synch with the motifs of the rest of your site.

Once you have completed the installation successfully, you will have a working comments form like the one shown below (go ahead and test it).

  • Feel free to send us your comments, suggestions, and/or questions. We value your input and desire to make these pages as useful as possible. Please leave an E-mail address so we can reply to you.

    If your web client supports the "mailto" URL, you can use your local mail app to compose and send a mail message. Otherwise, you can use the form below.

    For those using browsers that do not support forms such as this, send mail to: cgi-info@web-design.net


    Your Full Name:

    Your E-mail address:

    The Subject of Your Message:

    Your comments, suggestions, and/or questions:


top


bd