• Adhost Webmail
    • Client Login

Support - Pubform

HTML Forms are a simple tool for gathering information from visitors that are viewing your Web site. In this tutorial we provide further instructions on incorporating Adhost's HTML Form handler, pubform.pl, into your Web site. The form is available to all Adhost clients. The form is on a Unix server; If you are on a Windows server, please email support@adhost.com to be allowed to use the form from one of the Unix servers (you will be sent an email with the correct link to the pubform).

The First step in creating a Form is to make your hidden input variables. These are the variables that tell our Perl Script how to handle your form. They are called hidden, because unlike the inputs that appear on your Web site, these will not be seen.

Note: The script sorts the results by the value of the name. You can change the order by changing the name values with a number_value name. Such as: Name="03_Address", Name="04_city" and Name="05_State".

<FORM METHOD="POST" ACTION="/cgi-bin/pubform.pl">
The above form tag must be included in your HTML and it must remain unchanged. Copy and paste this tag into your HTML if you need to, but your <form> tag must be identical. Unless you are on a non-unix server! If this is the case you will need to contact support@adhost.com for the proper ACTION URL to use.

The following inputs give you a variety of options that will affect how data is collected and seen in your Form.

<INPUT TYPE="text" SIZE=20 NAME="email">
You MUST name your email field "email" or "form_from" nothing more, nothing less, and no numbers. This field will be the "From:" address of the email sent when the form is filled out. WARNING! If you don't use either "form_from" or "email" your completed form email will appear to be from "pubform@server.adhost.com", rather than the person who filled out the form.

<INPUT TYPE="hidden" NAME="form_userid" VALUE="yourname@yourdomain.com">
This line needs YOUR full email address - or the address to which you wish the form to be sent to. Place it in between the quotes and after the word VALUE.

<INPUT TYPE="hidden" NAME="form_webpage" VALUE="http://adhost.com/support/ site_creation/htmltips/july00.shtml">
This line needs the full www address (URL) that will appear as a link on the default web page returned when the form is submitted. (ie: http://www.abccompany.com/contact.html, in between the quotes of the value field. If you use a responseURL (see below), this tag is ignored.

<INPUT TYPE="hidden" NAME="form_show" VALUE="NO">
There are a few options with the above input:

  • Set VALUE to "NO" if you don't want the user to see the results.
  • Set VALUE to "YES" if you do want the user to see what he/she entered.

Note that this option does not work if you use a response page.

 <INPUT TYPE="hidden" NAME="form_responseURL" VALUE="">
(ie: VALUE=contact/response.html)
Note: This response page MUST exist or the form submit will fail. You need to make the response page and place it in the appropriate directory. You may also create a responseURL page that is not located on this server. In either case you have to specify a full URL path.
(ie.VALUE="http://www.domain.com/folder/myresponse.html")

<INPUT TYPE="hidden" NAME="form_subject" VALUE="help site web form results">
This line's VALUE may be left blank, or it may contain the "Subject:" of the email that is returned with the form results.

<INPUT TYPE="hidden" NAME="form_required" VALUE="01. Full Name, 02. Address">

  • This line's VALUE may be left blank, or it may contain a list of required NAME values (field names), separated by commas and NO spaces before or after the comma.
  • In the example above, 2 INPUTS on this page are required, "01.Full Name, 02.Address"

 <INPUT TYPE=HIDDEN NAME="form_confirm" VALUE="Yes">
This line may be left blank, or set VALUE to "Yes" to send a confirmation email to the person filling out the form

<INPUT TYPE=HIDDEN NAME="form_tofile" VALUE="">
Note: This type will only work on a unix server. This line may be left blank, or set VALUE to the unix path of a plain text file which will have the form info appended to it. This file must be made writable by the web browser (chmod 660). The data will be comma separated and in the same alphabetically sorted order as the normal email.

Home   |   Articles   |   Site Map   |   Privacy Policy   |   Terms And Conditions   |   sales@adhost.com
Local Phone: (206) 404-9000 | Toll Free: (888) ADHOST-1 (234-6781)
Fisher Plaza, 140 4th Ave N Suite 360, Seattle, WA 98109
ADHOST © 1996-2008  |  Seattle Colocation  |  About Adhost  |  Newsletter Sign-up  |  Blog  |  Map