Creating Forms
-
For more information on this topic see the AOL Press Tutorial topic on
Creating Forms.
-
"Forms allow readers of your Web page to send you information. You can create
forms that send you email, forms that search a database, forms that add
information to a database, and more". (AOL Press Tutorial: Creating Forms)
-
This tutorial will show you how to create a form that a visitor to your site
can use to send you information in the form of an email message.
-
When you are ready to start creating your form open AOL Press.
-
You can either create a new page by selecting File then New
then New Page or you can use a template (a copy of an existing page
that you have renamed).
-
To create your form, click the Format menu then the Form option.
-
You will see a window like
this:
-
Under the Form Handler Location: put the following address:
-
go.lasso?[nothing]
-
NOTE!: There is a period between go and lasso in the statement above! It
is necessary that you include this period.
-
Under Method select POST.
-
You don't need to do anything with Target Frame unless you are using
frames on your web page. (see the AOL Press Tutorial topic on Creating
Frames for more information)
-
(If you would like to get more help on the form topic click the Help
button.)
-
After you click OK you will see a dotted box appear on the page as
well as a floating window (or palete) that will appear if you click inside
the dotted box and disappear by clicking outside the dotted box.
-
All of your form work will be done inside this dotted box.
-
The tools palete will look like
this:
-
It is now necessary to view the HTML to add some code.
-
Click on Tools then Show HTML.
-
Find the line that says this:
-
<FORM action="go.lasso?[nothing]" method="POST">
-
Click to the end of the line and press ENTER to start a new line.
-
Now enter this text
<input type="hidden" name="[response]" value="response web
page">
<input type="hidden" name="[emailhost]" value="mail.lapeer.lib.mi.us">
<input type="hidden" name="[emailto]" value="the email address to
which the message will be sent">
<input type="hidden" name="[emailformat]" value="the email format
file">
<input type="hidden" name="[emailfrom]" value="the same email address
that you used above">
<input type="hidden" name="[emailsubject]" value="the information
you want to appear on the subject line of the email">
-
Notice the information that is in bold and italics.
-
You will need to enter the correct information for your individual form in
place of each of these.
-
The response web page is simply a page that tells the visitor
that their message has been submited. (it is possible to include in this
response the information that the visitor supplied but it is not necessary)
-
the email format file is a text file that contains formatting instructions
for the email it will send. (we will cover how to create this text file later
- for now, just name this something related to the form page that you are
creating and be sure to end it with .txt)
-
For both the response web page and the email format
file be sure to include the directory for that file. (i.e. /Gov/County/
and then your department directory and any subdirectory then the name of
the file, with no spaces.)
-
Once you are finished you can click on File then Close then
click Apply.
-
Now that you have set up the information for your form you are ready to create
the body of your form.
-
When you are creating a form you need to think about how a person might respond
to your questions.
-
Will it be a yes or no answer? Will they need a space to write several lines
of text? Will it be a couple of words or so? Do you want them to pick one
option from a list of choices? Do you want them to pick as many of the choices
that apply?
-
These are all very different responses and they cannot all be taken care
of with a single text box.
-
A form allows you to use different tools from the tools palette to
accomplish this.
-
Notice the different options you have for these tools:
-
There is a tool for each type of question listed above.
-
To find more information on each of the tools shown above enter the following
location on the Location: line of AOL
Press:
C:\AOLPRESS\help\refer\form.htm
-
Then click on the image of the tool you are interested in. (these descriptions
are also printed in the Tutorial at the Library Headquarters)
-
When you are using one of these tools to create a new field for a visitor
to enter information, name the field something related to what will be put
in it and try to keep in lower case for simplicity.
-
For example, if you are asking for a person's email address call the field
something simple like email.
-
It is a good idea to keep a list of these field names exactly as you entered
them for when you create your email text file later.
-
Be sure to include a Submit button at the end of your form. (you can
also include the Reset button to allow the user to clear all the fields
and start over)
-
Once you have inserted your Submit button (located on the tools palete)
drag your cursor over the Submit button that you now have on your
page so that it is highlighted (you should see a gray box around it similar
to when you highlight text)
-
Now click on the Tools menu then click Show HTML.
-
Notice that the code for the submit button is now highlighted. (this makes
it easier to find your place when switching over to the HTML code)
-
This is what you should see highlighted:
<INPUT TYPE=submit>
-
For the purposes of creating our form this code is not sufficient.
-
Add the necessary coding to make the statement look like this:
<INPUT TYPE="submit" name="[nothing]" value="the
name you want to appear on your button">
-
The item that is in italics is where you put whatever you want your button
to say on it (if you leave this out the button will default to saying "Submit").
-
The items that are bold are what you need to add. (notice that you need the
quotation marks around the word submit even though AOL Press left them out.
-
When your code resembles the above statement, the File menu then click
Close the click Apply when you are prompted.
-
When you have finished creating your form, you are ready to make text file.
(be sure to remember the name you used for the text file when you typed it
in the HTML code from earlier in this tutorial.)
-
Go to Creating Forms: Creating Email Text files to create the text
file we talked about earlier.
Return to Contents page