Forms

The instruction contained herein can be used to create a new or modify an existing HTML form to work with preinstalled scripts located on the Univox servers. The e-mail scripts reside in the server's cgi-bin directory and do NOT have to be installed within your own account. Univox offers two different e-mail scripts for use by our web hosting clients:

Email CGI
CGIemail

The interface between the e-mail script and the web visitor is called a "form". A form consists of any number of specified variables and is written using HTML code. At the bottom of the form is a button used to "submit" the information that has been filled out to the e-mail script which parses the pertinent information, compiles an e-mail and sends it out to the recipient.

The form itself works in close conjunction with the varibles specified in the script and must be configured in an exact manner in order for the form to work properly. One of the most easily overlooked situations is in reference to "case sensitivity". When referencing a variable in the form called "Name" you must make sure that the same variable listed in the portion of the code that calls cgiemail is in the same case (ie. "name" won't work as long as the "n" is not capitalized.)

In building your form you will most likely want to get the visitor's name. You can do this with the following code:

<input type="text" size="35" maxlength="256" name="realname">

You may also want to get the name of the organization or company that your visitor works for:

<input type="text" size="35" maxlength="256" name="Organization">

The e-mail address is certainly an important piece of information:

<input type="text" size="35" maxlength="256" name="email">

You can do the same thing with the visitors address, telephone, fax or any other piece of information that you want.

If you would like to have an area where your visitor can enter in comments or questions you can use this code:

<textarea name="Remarks" rows="6" cols="47" wrap="virtual"></textarea>

The key to this form is to make sure that whatever is called out in the "name=" field is duplicated with the exact syntax in the portion of the HTML form that calls the script.

To finish the form you will need a button to click that will submit the information. It is also handy to have a second button which clears any information that has been typed into the form. You can use this code for the two buttons:

<INPUT TYPE="Submit" VALUE="Submit">
<INPUT TYPE="Reset" VALUE="Reset">

The closing form tag is then required:

</form>

If you would like to see an example of a working Email form you can click here.

Return to table of contents

© 2007 Univox Internet, Inc.