Adobe GoLive Tutorial

Feedback Forms processed by CGI

The ability to interact with users is one of the great lures of the Internet for businesses and individuals. One of the most common ways to get user feedback is to use HTML forms that are processed by cgi (Common Gateway Interface) scripts.

Most books give me the old "setting up the cgi script is beyond the scope of this book" line and has long been a frustration to many of my students as well. I hope that this tutorial helps you set up a feedback form that uses the wonderful free cgi script FormMail offered for download at Matt's Script Archive. Be sure to get the latest version, 1.91, as it addresses some security issues.

cgi form tag

Once you have that, let's set up the form before we configure the script. Have your forms icon selected in your GoLive Objects panel. Drag a form onto the page. Enter your settings as follows: Select POST as the method. Put down the path to your cgi script as the action. On your web server you will most likely save your cgi script to a cgi-bin folder. The path would look like this: /cgi-bin/FormMail.pl (the pl stands for Perl, which is the most common scripting language used in CGI scripts.) You might also want to put the absolute (or full) path of your domain name. Mine is http://www.swanilda.com/cgi-bin/FormMail.pl Give your form a name.

If you like, add a table to your page within the opening and closing form tags in which you can neatly lay out your form objects. I created a 6 row, 2 column table with a pixel width of 400. The left column is 125 pixels, and is right aligned. I added the following labels to the rows: Name, Email, Comments, Did you like this tutorial? and Check here if you would like our newsletter. (See the completed form here.)

Text Field

Next to the cell that contains the label "Name" drag a text field form object to the cell on the right. I name it "name" because the cgi script will then return the data to me as “name = Person's Name.” I can add a default value to appear in the field to make the form more accessible to people with disabilities. I made visible 35 so that there is room for longer names.

Now add another text field next to the cell that says email. I named it email and entered a value Enter your email address here.” I again set visibility 35.

Text Area

Next to Comments, drag a text area form object. Give it a name. This is like a text field, except that you have more room available for longer areas of text. Rows and columns allow you to designate the amount of space you want to show on the page.

Radio Groups

Now let's add some radio buttonsfor the question "Do you like this tutorial?" The key to radio buttons is to give all the radio buttons in the group the same name. That way, the user can select only one choice. I dragged two radio buttons next to the question. I named them both "likeTut" and gave one a value of yes, and the other a value of no.

Checkbox

The last form object we will use is the checkbox. Drag a checkbox object next to the newsletter request. Give it the name "newsletter" and a value of yes. You can also choose the "Select" box if you want the checkbox to have a check in it by default.

Setting up the Submit and Reset buttons-->