Chapter 20
Quick and Easy Forms
CONTENTS
Everyone has filled out countless forms-order forms, registration
forms, personal information forms, surveys, and so on. Even when
you enter a message or article in a discussion, you are using
a form. Essentially, whenever information is exchanged, it is
done through a form.
Designing a form can be tedious, especially if you want to ask
many questions. Laying out the form and aligning the fields is
a task in itself. It could take you hours to complete the form.
Have no fear. In FrontPage, creating forms is a breeze. The Form
Page Wizard does most of the work for you. It takes care of the
layout and enables you to present questions in several different
categories. You think of a question, pick the category that best
handles how you want to present it, assign a few variables, and
away you go. You can design your form in a matter of minutes.
The Form Page Wizard is a gem. You use it to design just about
any type of form you can think of. If you know the type of form
you want to design and the questions or responses you need, the
rest is absolutely simple.
When you create a form with the Form Page Wizard, you begin on
a new page. After you complete the form, you can add additional
content to it or copy its contents to the clipboard to paste into
another page. To create a form with the Form Page Wizard, follow
these steps:
- From the FrontPage Explorer, create or open a web in which
to save your pages. Choose Tools | Show FrontPage
Editor or use the Show FrontPage Editor button to open the FrontPage
Editor.
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- Highlight Form Page Wizard and choose OK or press Enter. The
introductory screen of the Form Page Wizard appears.
The first screen of the Form Page Wizard, shown in Figure 20.1,
is an introductory screen. It explains what the Form Page Wizard
does. You navigate forward and backward through the wizard by
using the navigation buttons at the bottom of each dialog box.
Figure 20.1 : The introductory screen of the Form Page Wizard.
Click the Cancel button to leave the Form Page Wizard without
creating the page. Click the Back button to review the
questions or choices that you made in previous screens. Click
the Finish button to generate the page with the content
you have chosen up to that point. Click the Next button
to proceed to the next step.
NOTE |
In some cases, you cannot go back unless you assign a name to the group of fields for the question on which you are working. You can go back and review the question after you assign the name.
|
On the second screen of the Form Page Wizard, shown in Figure
20.2, you enter a URL for the page and a page title. After you
enter the name, you proceed to add questions to the form.
Figure 20.2 : Enter a page URL and a page title.
The third screen of the Form Page Wizard, shown in Figure 20.3,
appears next. You use this screen to add, modify, remove, or rearrange
the order of questions. The steps to create each type of question
are described in more detail in the tasks in this chapter. In
brief, these are the basic procedures you use to add a question
to a form:
Figure 20.3 : You can add, modify, remove, or rearrange questions.
- Click the Add button shown in Figure 20.3. The screen
shown in Figure 20.4 appears.
Figure 20.4 : Choose the type of question you want to ask, and enter a question in this screen.
- Choose a question type and enter a prompt or question. The
types of questions you can add are described in Table 20.1.
- Configure the options for the form fields to the question
on the appropriate screen.
- To enter another question, repeat steps 1 through 3.
- Click Next to continue with the Form Page Wizard after
you have added all your questions to the list. You proceed to
the "Choosing How to Display Your Questions" task, described
later in this chapter.
Table 20.1. Types of Questions in the Form Page Wizard.
Question Type | Description
|
Contact information | Prompts the user for contact information such as name, postal address, work and home phone numbers, Fax number, and e-mail address.
|
Account information | Prompts the user for a username and password.
|
Product information | Prompts the user for a product name, platform and version number (for software products), serial number, model, and product code.
|
Ordering information | Displays an order form and prompts the user for billing and shipping information.
|
Personal information | Prompts the user for name, age, height, weight, ID number, hair color, and eye color.
|
One of several options | Prompts the user to select one of several options presented on the form.
|
Any of several options | Prompts the user to select one or more options from several presented on the form.
|
Boolean | Prompts the user for a yes/no, true/false, or similar response.
|
Date | Prompts the user for a date in mm/dd/yy, dd/mm/yy, or free format.
|
Time | Prompts the user for a time entry (hh:mm:ss) in am/pm format, 24-hour format, or free format.
|
Range | Prompts the user for a single response in a scale ranging from bad to good, 1 to 5, or disagree strongly to agree strongly.
|
Number | Prompts the user for a numerical response.
|
String | Prompts the user for a brief single-line text response.
|
Paragraph | Prompts the user for a multilined or lengthy text response.
|
Modifying Questions
You also modify questions from the screen shown in Figure 20.3.
To modify a question, do the following:
- From the screen shown in Figure 20.3, highlight the question
that you want to modify.
- Click the Modify button. The question's option screen
appears, and you can modify the question.
Removing Questions
You can remove questions from your form design with the screen
shown in Figure 20.3. To remove a question from the list, perform
the following steps:
- From the screen shown in Figure 20.3, highlight the question
that you want to remove.
- Click the Remove button. The question is removed from
the list.
NOTE |
To remove all the questions from the list, click the Clear List button.
|
Reordering Questions
You can use the Move Up and Move Down buttons in
the screen shown in Figure 20.3 to rearrange the order of your
questions as follows:
- From the screen shown in Figure 20.3, highlight the question
that you want to move.
- Click the Move Up or Move Down button to change
its location in the list.
After you complete your question list, select how you want to
present it, using the screen shown in Figure 20.5.
Figure 20.5 : Choose how you want to present your questions.
To present your questions, follow these steps:
- Select a format for displaying your questions. Choose one
of the following options:
as normal paragraphs
as a numbered list
as a bulleted list
as a definition list
- Choose whether or not you want a table of contents included
on your form. If your form is lengthy, choose yes. Links
to the questions are listed at the top of the page. When the user
clicks the link, the page jumps to the appropriate question.
NOTE |
You must edit the table of contents manually to reflect the questions on your form.
|
- Choose how you want your form fields displayed. By default,
the form fields are displayed in table cells, which makes layout
of your form much easier and more flexible. To display the form
fields as formatted paragraphs, uncheck the "use tables
to align form fields" checkbox.
- Click Next to proceed to the next screen.
The screen shown in Figure 20.6 asks how you want to retrieve
the information from the form.
Figure 20.6 : Choose the output option.
To specify how you want to retrieve the information, follow these
steps:
- Choose how you want to handle the input from the form. You
can store the responses in one of three ways:
- save results to a web page. When you
choose this option, the results from the form are stored on your
site in Web page format, using an .htm extension.
- save results to a text file. When you
choose this option, the results of the form are stored on your
site in text format, using a .txt extension.
- use custom CGI script. When you choose
this option, the results of the form are passed to a custom CGI
script for further processing.
- Enter the base name of the results file. This is the
name of the Web page, text file, or CGI script where you store
the responses of the form. Don't include the extension in your
entry here. The full name of the results file is displayed below
the data entry field.
- Click Next to continue with your form.
The screen shown in Figure 20.7 is the final screen in the Form
Page Wizard. Here, you simply click Finish to create your
form. Your page appears in the FrontPage Editor window. At this
point, you can save it to your web, or you can copy it to the
Clipboard and paste it into another page in your web.
Figure 20.7 : The Form Page Wizard.
Now that you know the basics about how to create a form, try some
of your own. This first example creates a simple guest book page
by adding two questions with the Form Page Wizard. The first question
asks the user to rate your Web site by choosing one response in
a scale. Then, the user adds comments in a paragraph field on
the page. Figure 20.8 shows a complete example of this guest book.
Figure 20.8 : This simple guest book page uses range and paragraph questions.
After creating the page, I moved the form fields into tables,
changed the page properties, and changed the font to Arial. I
also added an Include bot after the heading that reads "Here's
What Our Visitors Have to Say."
To create a simple guest book page, follow these steps:
- From the FrontPage Explorer, create or open a web in which
to save your page. Choose Tools | Show FrontPage
Editor or use the Show FrontPage Editor button to open the FrontPage
Editor.
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- Choose Form Page Wizard and click OK. The Form Page Wizard
introductory screen appears.
- Click Next to continue to the next screen. The screen
shown in Figure 20.2 appears.
- In the Page URL field, enter guestbk.htm.
- In the Page Title field, enter Guest Book.
- Click Next to continue to the next screen. The screen
shown in Figure 20.3 appears. You are now ready to add your questions
to the page.
You want to know what visitors think of your site. One easy way
to obtain this answer is to ask a range question. You can tell
at a glance how you're doing. Figure 20.9 shows three questions
and the form fields generated by a range question.
Figure 20.9 : Range questions show a scale of 1 to 5, bad to good, or strongly disagree to strongly agree. You can use radio buttons or drop-down menus.
To add a range question to the guest book page, perform the following
steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Range.
- Edit the prompt for this question. Here, you enter
the question you want to ask of the user. Enter How do you
rate this site?.
- Click Next to configure the form fields for this question.
- How should the user provide an answer? The guest book page
shown in Figure 20.8 uses the second option (Bad, poor, average,
fair, good). Refer to Example 2 in Figure 20.9 for a similar question.
The other options from which you can choose include the following:
- On a scale of 1 to 5. The user chooses from one of five choices,
labeled with numbers 1 to 5, as shown in Example 1 of Figure 20.9.
- From "disagree strongly" to "agree strongly."
The user chooses from one of five choices, labeled from disagree
strongly to agree strongly, as shown in Example 3 of Figure 20.9.
- Choose from the following presentation options:
- Mid-range choice is default. The example in this chapter uses
this option, making average the default choice in the group of
radio buttons on the form, as in Example 3 of Figure 20.9.
- Use drop-down menu instead of radio buttons. If you choose
this option, the list is displayed in a drop-down menu list, as
in Example 3 of Figure 20.9.
- Enter the name of a variable to hold this answer. Here,
you assign a brief and descriptive variable name for this question.
This variable name is sent to the form handler with the value
selected by the user, as a name/value pair. There is no default
name, and this field must be completed before leaving the screen.
Enter Rating.
- Click Next to add another question or proceed with
the form.
The guest book also includes an area where the user can add comments
about your site. Generally, you hope that users enter something
more than a single line of text. To encourage such cases, use
a paragraph question when you need a multiline response. Figure
20.10 shows an example of a paragraph question on a page.
Figure 20.10 : Use a paragraph question when several lines of text are required for a response.
To complete a paragraph question, follow these steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Paragraph.
- Edit the prompt for this question. Enter Add your
comments here:.
- Click Next to configure the form field for this question.
- Enter the name of the variable to hold the answer. Enter Comments.
- Click Next to proceed with the form.
After you complete your list of questions, you see the screen
shown in Figure 20.5. To complete the guest book, follow these
steps:
- From the screen shown in Figure 20.3, click the Next
button. The screen shown in Figure 20.5 appears.
- How should the list of questions be presented? Choose "as
normal paragraphs."
- Would you like a Table of Contents for this page? Because
the form is brief, choose No.
- The "use tables to align form fields" checkbox
is checked by default. You can leave this selection as is.
- Click Next to continue. The screen shown in Figure
20.6 appears.
- How do you want to handle the input generated by users when
they submit a form? You want the users' comments to be included
on a Web page on your site. Choose "save results to a web
page."
- Enter the base name of the results file. Here, you
enter the name of the Web page that stores the users' responses.
The results should be sent to a different page. The appropriate
file extension is added to this name automatically. Enter guestlog.
- Click Next to proceed to the final wizard screen.
- Click Finish to create your form. The form appears
in the FrontPage Editor window.
If you want to sell your products online, you can easily create
an online ordering form. The example shown in Figure 20.11 features
contact information, ordering information, and Boolean questions.
After creating the page, I moved the form fields into tables,
changed the page properties, and changed the font to Arial.
Figure 20.11 : Contact information, ordering information, and Boolean questions are used in this online order form.
To create the online order form shown in Figure 20.11, follow
these steps:
- From the FrontPage Explorer, create or open a web in which
to save your page. Choose Tools | Show FrontPage
Editor or use the Show FrontPage Editor button to open the FrontPage
Editor.
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- Choose Form Page Wizard and click OK. The Form Page Wizard
introductory screen appears.
- Click Next to continue to the next screen. The screen
shown in Figure 20.2 appears.
- In the Page URL field, enter order.htm.
- In the Page Title field, enter On-Line Order Form.
- Click Next to add a question to the form.
Use a contact information question when you need to know how to
contact the person filling out your form. Information request
forms often ask for contact information. Figure 20.12 shows examples
of the fields available for contact information.
Figure 20.12 : You can request different types of contact information.
To complete a contact information question, do the following:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Contact Information.
- Edit the prompt for this question. Enter Please
enter your billing address and other contact information in the
spaces provided..
- Click Next to configure the form fields for this question.
- Choose the items to collect from the user:
- Full. The user enters his name in a single
field, as in Example 1 of Figure 20.12.
- First, last. The user enters his name
in two separate fields, as in Example 2 of Figure 20.12. Select
this option to create your online ordering form.
- First, last, middle. The user enters
his first name, last name, and middle initial in three separate
fields, as in Example 3 of Figure 20.12.
- Check or uncheck the boxes to include the contact information
that you want to obtain. For your ordering form, choose Postal
Address, Work Phone, Home Phone, FAX, and
E-Mail Address. The other options from which to choose
include Title, Organization, and Web Address
(URL). See Figure 20.12 for examples.
TIP |
It is most efficient-for you and for the person filling out the form-to ask for no more information than you need in response to a question.
|
- Enter the base name for this group of variables. Leave
this at the default name of Contact.
- Click Next to add another question.
Use an ordering information question when you want users to order
products online. You can create order forms easily. Figure 20.13
shows examples of the fields for this type of question.
Figure 20.13 : Use ordering information in an online order form.
To complete an ordering information question, choose the data
of items that you want to collect from the user.
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Ordering Information.
- Edit the prompt for this question. Enter What products
would you like to order?
- Click Next to configure the form fields for this question.
- If you want to include an order form on your page, complete
the following items:
- List of products and quantities. Check this
option to include an order form on the page.
- Maximum number. This is the number of lines
in the order form. Leave this value set at the default of five
lines.
- Check Billing Information to ask for the method of
payment, and choose the type of field for billing information:
- Credit card. Choose this option.
The name of the cardholder and the card's number and expiration
date are entered in text fields, as in Example 1 of Figure 20.13.
- Purchase order. If you choose the Purchase
Order option, the user enters a purchase order number and account
name in text boxes, as in Example 2 of Figure 20.13.
- Check the Shipping Address checkbox to include shipping
information fields on the order form.
- Enter the base name for this group of variables. Leave
this at the default name of Ordering.
- Click Next to add another question.
Use a Boolean question when you want to ask a question that requires
an either/or response. Figure 20.14 shows some examples.
Figure 20.14 : Boolean questions can be answered with checkboxes or radio buttons.
To complete a Boolean question, follow these steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Boolean.
- Edit the prompt for this question. Enter Would
you like overnight
delivery? (Additional charges apply).
- Click Next to configure the form fields for this question.
- Select the type of response area that you want to include
in the form.
- Checkbox. The user checks or unchecks
a checkbox to enter the response (see Example 1 of Figure 20.14).
- Yes/no radio buttons. Choose this option
to provide Yes and No radio buttons (see Example 2 of Figure 20.14).
- True/false radio buttons. The user chooses
between a Yes and a No radio button (see Example 3 of Figure 20.14).
- Enter a variable name for holding this answer. There
is no default name. Enter Overnight.
- Click Next to proceed with the form.
After you complete your list of questions, you see the screen
shown in Figure 20.5. To complete the online ordering form, follow
these steps:
- From the screen shown in Figure 20.3, click Next. The
screen shown in Figure 20.5 appears.
- How should the list of questions be presented? Choose "as
normal paragraphs."
- Would you like a Table of Contents for this page? Because
the form is brief, choose No.
- Leave the "use tables to align form fields"
option checked.
- Click Next to continue. The screen shown in Figure
20.6 appears.
- How do you want to handle the input generated by users when
they submit a form? You want the data from this form to be compatible
with a database or spreadsheet program. Choose "save results
to a text file."
- Enter the base name of the results file. Enter Ordering.
- Click Next to proceed to the final wizard screen.
- Click Finish to create your form. The form appears
in the FrontPage Editor window.
After you complete the form, review the form fields to customize
them further, as discussed in Chapter 21. You also need to verify
the settings of the form handler, using the procedures outlined
in Chapter 22, "Runtime Bots-The Heartbeat of FrontPage Forms."
Charlie's Astrological Data page, shown in Figure 20.15, uses
personal information, date, time, and string questions to complete
the form. It's designed to direct the user to another form on
or from the confirmation page when he submits his chart data.
From the second form (not shown), the user selects the type of
chart he wants to have done and completes the billing information.
This reduces the amount of form fields on one page and makes it
easier to complete.
Figure 20.15 : Charlie's Astrological Data Page uses personal information, date, time, and string questions.
To create Charlie's Astrological Data page, follow these steps:
- From the FrontPage Explorer, create or open a web in which
to save your page. Choose Tools | Show FrontPage
Editor or use the Show FrontPage Editor button to open the FrontPage
Editor.
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- Choose Form Page Wizard and click OK. The Form Page Wizard
introductory screen appears.
- Click Next to continue to the next screen. The screen
shown in Figure 20.2 appears.
- In the Page URL field, enter astro.htm.
- In the Page Title field, enter Charlie's Astrological
Data Page.
- Click Next to continue to the next screen. The screen
shown in Figure 20.3 appears. You are now ready to add your questions
to the page.
You can ask for personal information in your forms, including
age, sex, height, weight, ID number, and hair and eye color. Figure
20.16 shows examples of the fields.
Figure 20.16 : You can request several types of personal information.
To complete a personal information question, perform the following
steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Personal Information.
- Edit the prompt for this question. Enter Enter
your personal information here:.
- Click Next to configure the form fields for this question.
- Choose the data items to collect from the user. Verify that
the Name option is checked. If you do not want to request
a name in this section of the form, uncheck the option. The options
are
- Full. The user enters his name in a single
text field, as in Example 1 of Figure 20.16. Select this option
for your page.
- First, last. The user enters his first
and last names in individual fields, as in Example 2 of Figure
20.16.
- First, last, middle. The user enters
his first name, last name, and middle initial in individual fields,
as in Example 3 of Figure 20.16.
- Uncheck the Age checkbox for this page. Although a
date of birth is entered in this form, it uses a different format.
For reference, the following selections are available for reporting
age:
- Years old. The user enters his age in years,
as in Example 1 of Figure 20.16.
- Date of birth. The user enters his date of birth,
as in Example 2 of Figure 20.16.
- Check or uncheck the additional types of information that
you want to request. For this page, choose only Sex. The
other options are Height, Weight, ID number,
Hair color, and Eye color. Examples are shown in
Example 1 of Figure 20.16.
- Enter the base name for this group of variables. Leave
this field at the default name of Personal.
- Click Next to add another question.
A date question asks the user for a date-a calendar date, not
the romantic kind. The user can enter a date response in one of
three ways. Figure 20.17 shows some examples.
Figure 20.17 : Users can enter dates in three ways.
To complete a date question, do the following:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Date.
- Edit the prompt for this question. Enter Enter
the date of your birth:.
- Click Next to configure the form fields for this question.
- How should the user provide an answer?
- Enter the name of a variable to hold this answer. There
is no default name. Enter DOB.
- Click Next to add another question.
A time question asks the user for a specific time. Figure 20.18
shows some examples.
Figure 20.18 : You can enter the time in 12-hour, 24-hour, or free format.
To complete a time question, follow these steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Time.
- Edit the prompt for this question. Enter Enter
the time of your birth in 24-hour format..
- Click Next to configure the form fields for this question.
- How should the user provide the answer? Your options follow:
- hh:mm:ss-am/pm. The user enters
the response in 12-hour format, followed by AM or PM, as shown
in Example 1 of Figure 20.18.
- hh:mm:ss-24-hour clock. The user
enters the response in 24-hour format, as shown in Example 2 of
Figure 20.18. Choose this option for Charlie's page.
- Free format. The user enters the response
at his or her choosing, as shown in Example 3 of Figure 20.18.
- Enter the name of a variable to hold this answer. There is
no default name. Enter TOB.
- Click Next to add another question or proceed with
the form.
Ask for a string response when you need a single line of text
input from the user. A typical question might be What is the
name of your pet?. Figure 20.19 shows an example.
Figure 20.19 : Use a string question when a single-line text response is sufficient.
To complete a string question, do the following:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose String.
- Edit the prompt for this question. Enter Enter
the city, state or
province, and country of your birth.
If you know the longitude
and latitude of your birthplace, enter the coordinates instead..
- Click Next to configure the form fields for this question.
- The default length of the text field is 50 characters, which
you keep for this form. To specify a different length, check the
Set Maximum Length checkbox and enter a new maximum number.
- Enter the name of a variable to hold this answer. There
is no default value. Enter POB.
- Click Next to add another question or proceed with
the form.
After you complete your list of questions, you see the screen
shown in Figure 20.5. To complete the online ordering form, follow
these steps:
- From the screen shown in Figure 20.3, click Next. The
screen shown in Figure 20.5 appears.
- How should the list of questions be presented? Choose "as
normal paragraphs."
- Would you like a Table of Contents for this page? Because
the form is brief, choose No.
- Leave the "use tables to align form fields"
option checked.
- Click Next to continue. The screen shown in Figure
20.6 appears.
- How do you want to handle the input generated by users when
they submit a form? Choose "save results to a text
file."
- Enter the base name of the results file. Enter astrolog.
- Click Next to proceed to the final wizard screen.
- Click Finish to create your form. The form appears
in the FrontPage Editor window.
You typically use registration pages to register for an event
or to gain access to a protected web site. The latter is the case
for this page. It contains a form in which a user enters his or
her name, password, and beta site ID to gain access to a protected
beta web site. It uses an account question and a number question.
For the example shown in Figure 20.20, I made some minor modifications
to the layout of the form. I added two rows to the table that
contains the account question. The number question and form buttons
go in the same table. A graphic appears in place of the page title.
Figure 20.20 : The site registration page features account information and number questions.
To create the site registration page shown in Figure 20.20, follow
these steps:
- From the FrontPage Explorer, create or open a web in which
to save your page. Choose Tools | Show FrontPage
Editor or use the Show FrontPage Editor button to open the FrontPage
Editor.
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- Choose Form Page Wizard and click OK. The Form Page Wizard
introductory screen appears.
- Click Next to continue to the next screen. The screen
shown in Figure 20.2 appears.
- In the Page URL field, enter sitereg.htm.
- In the Page Title field, enter Beta Site Registration
Page.
- Click Next to continue to the next screen. The screen
shown in Figure 20.3 appears. You are now ready to add your questions
to the page.
Use an account information question to obtain a username and password.
Account information questions are often used on registration forms,
such as those used to gain access to a protected web. Figure 20.21
shows examples of the options available for account information.
Figure 20.21 : Account information questions ask for a user's name and password.
To complete an account information question, perform the following
steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Account Information.
- Edit the prompt for this question. Enter Please
provide your name and password in the fields below:.
- Click Next to configure the form fields for this question.
- Select how to include username information on your form. If
you do not want to include a username, uncheck the username
option. Your options follow:
- As single field. The user types his full
name, as in Example 1 of Figure 20.21.
- As first and last name fields (for WebBot
Registration component). Choose this option for your registration
page. You always make this choice when you use the Registration
bot to create a registration form for a protected web. Refer to
Example 2 of Figure 20.21.
- Choose how you want to receive password information. If you
do not want to include password information, uncheck the Password
option.
- Require confirmation (must type in twice).
Choose this option. The user confirms his password in a separate
field, as in Example 1 of Figure 20.21.
- Don't require confirmation. If you do not require
confirmation, the user enters his password once, as in Example
2 of Figure 20.21.
- Enter the base name for this group of variables. Leave
this variable at the default name of Account.
- Click Next to add another question.
Use a number question when you need numerical input from the user.
Figure 20.22 shows some examples.
Figure 20.22 : You can specify the length of a numerical response. You can also specify a currency symbol.
To complete a number question, follow these steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Number.
- Edit the prompt for this question. Enter Please
provide your Beta Site ID number:.
- Click Next to configure the form fields for this question.
- The default length of the numerical response is five characters.
To set it for 10 characters (the maximum) for your form, check
the "Set maximum length" checkbox and set the
value to 10.
- Check the "Set currency prefix" box if you
want to allow additional space for a currency symbol. Enter the
currency symbol in the designated field. Leave this option unchecked
for your form.
- Enter the name of a variable to hold this answer. There
is no default name. Enter BetaID.
- Click Next to proceed with the form.
After you complete your list of questions, you see the screen
shown in Figure 20.5. To complete the registration page, follow
these steps:
- From the screen shown in Figure 20.3, click Next. The
screen shown in Figure 20.5 appears.
- How should the list of questions be presented? Choose "as
normal paragraphs."
- Would you like a Table of Contents for this page? Because
the form is brief, choose No.
- Leave the "use tables to align form fields"
option checked.
- Click Next to continue. The screen shown in Figure
20.6 appears.
- How do you want to handle the input generated by users when
they submit a form? Choose "save results to a text
file."
- Enter the base name of the results file. Enter sitelog.
- Click Next to proceed to the final wizard screen.
- Click Finish to create your form. The form appears
in the FrontPage Editor window.
The software registration page, shown in Figure 20.23, enables
a user to register a software product online. This form utilizes
product information, one of several options, and any of several
options questions.
Figure 20.23 : Product information, one of several options, and any of several options questions appear in this software registration form.
To create the software registration page shown in Figure 20.23,
follow these steps:
- From the FrontPage Explorer, create or open a web in which
to save your page. Choose Tools | Show FrontPage
Editor or use the Show FrontPage Editor button to open the FrontPage
Editor.
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- Choose Form Page Wizard and click OK. The Form Page Wizard
introductory screen appears.
- Click Next to continue to the next screen. The screen
shown in Figure 20.2 appears.
- In the Page URL field, enter softreg.htm.
- In the Page Title field, enter Software Registration
Page.
- Click Next to continue to the next screen. The screen
shown in Figure 20.3 appears. You are now ready to add your questions
to the page.
Use a product information question to obtain warranty or registration
information on a product. A form for this type of question might
be a software registration form or a warranty service request.
Figure 20.24 shows the options available.
Figure 20.24 : Use product information questions to register software or request warranty service information.
To complete a product information question, follow these steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Product Information.
- Edit the prompt for this question. Enter What software
product are you registering?.
- Click Next to configure the form fields for this question.
- Choose how you want to receive the product name:
- Select from menu. Users can select from
a list of products in a drop-down menu, as in Example 1 of Figure
20.24.
- Type it in. Users type the name of the product,
as in Example 2 of Figure 20.24. Choose this option for your form.
- Check or uncheck the information you want to request on the
product. Choose "Platform and version (for software
products)" and "Serial number." Leave "Model"
and "Product code" unchecked.
- Enter the base name for this group of variables. Leave
this at the default name of Product.
- Click Next to add another question.
Ask a one of several options question when you want the user to
choose one response from a list of choices. An example of a question
in this category is What is your favorite color?. Figure
20.25 shows examples of the options for this question.
Figure 20.25 : A one of several options question enables you to obtain responses through drop-down menus, a series of radio buttons, or a scrollable menu list.
To complete a one of several options question, follow these steps:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose One of several options.
- Edit the prompt for this question. Enter Where
did you purchase this product?.
- Click Next to configure the form fields for this question.
- Enter the labels for the options, one on each line.
Enter the following items:
Internet
Mail Order
Department Store
Software Specialty Store
Direct from Manufacturer
Other or gift
- Select how you want to display the list:
- Drop-down menu. The list is displayed in a drop-down
menu, as in Example 1 of Figure 20.25. Select this option for
your form.
- Radio buttons. The list is displayed in a series
of radio buttons, as in Example 2 of Figure 20.25.
- List. The list is displayed in a scrollable
menu list, as in Example 3 of Figure 20.25.
- Enter the name of a variable to hold this answer. There
is no default variable name for this question. Enter Purchase.
- Click Next to add another question.
Ask an any of several options question when you want to provide
one or more choices from a list of several. Figure 20.26 shows
an example of the output that you receive.
Figure 20.26 : An any of several options question enables the user to make multiple choices. You can display the checkboxes in a single column or in multiple columns as shown here.
To complete an any of several options question, do the following:
- From the screen shown in Figure 20.3, click the Add
button.
- Select the type of input to collect for this question.
Choose Any of several options.
- Edit the prompt for this question. Enter What hardware
components do you have in your system?.
- Click Next to configure the form fields for this question.
- Enter the labels for the choices that you want to include
in the scrolling text box on the form. Keep these fairly short
if you want to display them in multiple columns. Enter the following
values:
Floppy - 3-1/2
Floppy - 5-1/4
CD-ROM
Sound Card
Modem
Video Capture
Joystick
Printer
Other
- Check the "Use multiple columns to present the
options" checkbox. If you do not check the box, the choices
are arranged in a single column.
- Enter the base name for this group of variables. The
default name is Option. Enter Hardware.
- Click Next to add another question or proceed with
the form.
After you complete your list of questions, you see the screen
shown in Figure 20.5. To complete the software registration page,
follow these steps:
- From the screen shown in Figure 20.3, click Next. The
screen shown in Figure 20.5 appears.
- How should the list of questions be presented? Choose "as
normal paragraphs."
- Would you like a Table of Contents for this page? Because
the form is brief, choose No.
- Leave the "use tables to align form fields"
option checked.
- Click Next to continue. The screen shown in Figure
20.6 appears.
- How do you want to handle the input generated by users when
they submit a form? Choose "save results to a text
file."
- Enter the base name of the results file. Enter orderlog.
- Click Next to proceed to the final wizard screen.
- Click Finish to create your form. The form appears
in the FrontPage Editor window.
You can design forms quickly and easily with the Form Page Wizard.
Start with a list of questions, and decide how you want to display
them. The wizard does the rest.
In this chapter, you learned how to design several customized,
interactive forms, using the FrontPage Form Page Wizard to ask
a variety of questions. Based on your selections, the wizard tailors
your form so that you can gather information from visitors to
your site.
The next two chapters help you edit your form fields and assign
form handlers to them. To learn more about the fields in your
form, see Chapter 21, "Fields-The Building Blocks of Forms."
To learn how to assign a form handler to your form, see Chapter
22, "Runtime Bots-The Heartbeat of FrontPage Forms."
Q: | I designed a form and put it on my Web site, but it does not do anything when I try to test it. What is happening?
|
A: | If you assigned a form handler to your form, check whether the FrontPage Server Extensions or custom scripts have been installed on your remote server. You might need to coordinate this with the server
administrator at your site. See Chapter 27, "Working with the FrontPage Servers," for more information.
|
Q: | Which is the better choice to use when I specify a results file-Web pages or text files?
|
A: | Generally, it is more efficient to store your results files as text files. When you store them in a Web page, it requires extra time for the server to process and format the results. You can find more
information on the different types of results files in Chapter 22, "Runtime Bots-The Heartbeat of FrontPage Forms."
|
Q: | Are Boolean questions stored as 1s and 0s or as True and False?
|
A: | When a user responds to a boolean question, the names and values that you specify in the form field properties dialog box are reported back to you.
If, for example, you create a question that asks, "Do you like cats?" and specify a checkbox with a name of likecats, an initial value of ON, and an initial status of not checked, the results appear as follows if the
user checks the box:
likecats ON
If the same question is asked using a Yes/No radio button with a group name of likecats, a Yes radio button that is initially selected, and a No radio button that is initially deselected, the results appear as follows if the user selects
No:
likecats No
|