Vineyard.NET Homepage Welcome to Vineyard.NET! homepage . about . faq your webmail . your account sign-up now! rates . resellers . terms history . travel . weather .   . businesses news . internet resources
 

Hey! What's going on?

Vineyard.NET is slowly transitioning towards a more standards compliant website that separates the look and feel of the site from the content.

This is done using a technology called Cascading Style Sheets (CSS). Unfortunately, support for CSS in older browsers (specifically, anything prior to a version 5.0) ranges from poor and incomplete to simply wrong and painful for both viewers and designers. Ultimately, there is no way to reliably design a CSS-based layout for older web browsers. Vineyard.NET will continue to ensure the overall functionality of its website for older browsers but the overall experience will be a little more spartan than before.

We apologize for any inconvenience this may cause and invite you to consider upgrading your web browser. For what it's worth, we like Mozilla but just about any modern browser, including Internet Explorer, should suffice.

Form Handler FAQ

What is form_handler.cgi?
Setting up your HTML form for VNI's form_handler.cgi
Optional form_handler.cgi parameters
An Example

What is form_handler.cgi?

Whenever you use a form, you must specify a URL which will be used to process the info from the form. The simplest URL to use is a mailto:. This works perfectly well, however, the results mailed to you are very hard to read.

Here is a (somewhat extreme) example of what one might receive from a form using a mailto: as it's handler:

domainName=Test+Domain&thisWindow=thisWindow&vniHostmaster=HM331-ORG&orgName
=Test+Organization&orgStreet=1+Main+Street&orgCity=Vineyard+Haven&orgState=M
A&orgZip=02568&orgCountry=US&admNIC=ASC001&admIndvRole=R&admOrgName=Administ
rator&admName=&admStreet=at+the+Office&admCity=Vineyard+Haven&admState=MA&ad
mZip=02568&admCountry=US&admPhone=phone++%23&admFax=&admEmail=null%40vineyar
d.net&billNIC=&billIndvRole=R&billOrgName=Test+Organization&billName=&billSt
reet=1+Main+Street&billCity=Vineyard+Haven&billState=MA&billZip=02568&billCo
untry=US&billPhone=&billFax=&billEmail=&userName=user&userDir=directory&user
DNSType=virtual+host&userAccType=web-ppp&webMaster=reseller&webReport=resell
er&lastname=&firstname=&thisNICWindow=on

While this is decipherable, form_handler.cgi performs the same task, but it organizes the information into a format that is more readable before it mails the information to you:


domainName:	Test Domain
thisWindow:	thisWindow
vniHostmaster:	HM331-ORG
orgName:	Test Organization
orgStreet:	1 Main Street
orgCity:	Vineyard Haven
orgState:	MA
orgZip:	02568
orgCountry:	US
admNIC:	ASC001
admIndvRole:	R
admOrgName:	Administrator
admName:
admStreet:	at the Office
admCity:	Vineyard Haven
admState:	MA
admZip:	02568
admCountry:	US
admPhone:	phone #
admFax:
admEmail:	null@vineyard.net
billNIC:
billIndvRole:	R
billOrgName:	Test Organization
billName:
billStreet:	1 Main Street
billCity:	Vineyard Haven
billState:	MA
billZip:	02568
billCountry:	US
billPhone:
billFax:
billEmail:
userName:	user
userDir:	directory
userDNSType:	virtual host
userAccType:	web-ppp
webMaster:	reseller
webReport:	reseller
lastname:
firstname:
thisNICWindow:	on

Setting up your HTML form for VNI's form_handler.cgi

A thorough discussion of HTML forms is beyond the scope of this document. If you would like to learn more about HTML on-line, one of my favorite starting places is the World Wide Web Consortium.

Your form tag needs to specify form_handler as the form's action with the post method as follows:

<form method="post"
      action="http://www.vineyard.net/cgi-bin/form_handler.cgi">

This HTML tag begins the form and specifies how the results will be processed.

All of the input items in your form should be thought of as parameters for form_handler.cgi. Most of the parameters are the items of your form: various input tags whose contents the viewer has supplied and you wish to receive. In addition, there are pre-requisite parameters, without which, form_handler.cgi will fail.

The only required parameter for form_handler.cgi is vniuser. This is the username of the Vineyard.NET customer (presumably yourself) who is to receive the contents of the form. To include this parameter you would type (presuming your username was joeuser):

<input type="hidden" name="vniuser" value="joeuser">
somewhere between your form's begin and end tags.

Optional form_handler.cgi parameters

You may specify some additional control parameters.

vnirequired is a comma-separated list of field names which you wish not to be empty. form_handler.cgi will refuse the submission with a polite complaint if the viewer has not supplied some information for fields. Please bear in mind that this specification is somewhat pointless. Since there is yet no way for computers to realize that sldkfjis is probably not a legitimate word in any known language, a field name's inclusion in vnirequired does no more than force the viewer to supply non-blank entries. We include the vnirequired option solely at customer request.

With the understanding that realname, e-mail, and comment are names of your fields, you might include:

<input type="hidden" name="vnirequired"
        value="realname,e-mail,comment">

vnisuccessurl is the name of the URL you would like to have displayed if-and-when form_handler.cgi has successfully completed its tasks. e.g.:

<input type="hidden" name="vnisuccessurl" value="mypage.html">

vnierrorurl is the URL you would like to have displayed if-and-when form_handler.cgi has suffered an error. Typically, once the form is configured and tested, the errors will probably limited to users leaving out a required field. e.g.:

<input type="hidden" name="vnierrorurl"
       value="http://mysite.tv/error.html">

vnisort is a comma-seperated list of fields to sort by when sent to you. form_handler.cgi will default to the order that is given to it. e.g:

<input type="hidden" name="vnisort"
       value="name,address,email,comment">
Will sort it in the order name, address, email and comment last.


vnisubject is the subject you wish the message to have. If this option is missing, form_handler.cgi will default to the subject: "Message from your form!"

<input type="hidden" name="vnisubject"
       value="Message from Form on comments.html">

vnimailto is an alternate destination address for your form data. If this option is left out, form_handler.cgi will mail the data to the Vineyard.NET customer listed in vniuser

<input type="hidden" name="vnimailto"
       value="spam.me.silly@nowhere.org">

vnigetinfo specifies additional information you want to receive about the person who is sending out your form. It's value is a comma-seperated list containing identifiers that specify what information you wish to receive.

These are the values you can use for vnigetinfo:
HOST - Include the hostname of the person who sent the form
IP - Include the IP address of the person.
BROWSER - Include browser information, such as name and version.
TIME - Include the time of the request.
example:
<input type="hidden" name="vnigetinfo" value="HOST,BROWSER,TIME">
This will include the hostname of the person who sent the form, also the browser version and the time of the request.

An Example

Joeuser wants to create a form that accepts a person's real name, e-mail address, and a comment.


<html>
  <head>
    <title>Joe's Unexciting Form</title>
  </head>
  <body>
    <form method="post"
          action="http://www.vineyard.net/cgi-bin/form_handler.cgi">
      <input type="hidden" name="vniuser" value="joeuser">
      <input type="hidden" name="vnirequired"
             value="realname,e-mail,comment">
      Real Name:
      <input type="text" name="realname">
      E-Mail Address:
      <input type="text" name="e-mail">
      Comment:
      <textarea name="comment"></textarea>
      <input type="submit" value="Submit it!">
    </form>
  </body>
</html>

Given that joeuser@vineyard.net is a VNI customer, this form should accomplish it's task.