Q
Unfortunately, the form included in our template products is just an
sample. In order to make it work, you have to do one of the followings:
Collect and store form data entered by site visitors
Important Forms depend on technology that your Web server must
provide. That technology may be FrontPage Server
Extensions, SharePoint Team Services version 1.0 from Microsoft, or
Microsoft Windows SharePoint Services 2.0. However, it could also be
ISAPI (ISAPI: Internet Server
Application Programming Interface), NSAPI (NSAPI:
Netscape Server Application Programming Interface),
CGI (CGI:
Common Gateway Interface. A standard method of extending Web server
functionality by executing programs or scripts on a Web server in response to
Web browser requests, such as in form processing. Use of CGI can make a Web page
more dynamic.), or Active Server Pages (ASP). Before you create a form,
ask your Web server administrator or Internet service
provider
(ISP) (ISP: A business that provides access to the
Internet for such things as electronic mail, chat rooms, or use of the World
Wide Web. Some ISPs are multinational, offering access in many locations, while
others are limited to a specific region.) which technology the server
supports.
Choose one of the following:
1) Set up a form to save form results to an existing database
You can save form results to an ODBC (Open
Database Connectivity (ODBC) driver: A program file used to connect to a
particular database. Each database program, such as Access or dBASE, or database
management system, such as SQL Server, requires a different driver.)-compliant
database. When a site visitor fills out a form and submits it, Microsoft
FrontPage enters the data directly into your database. If you are already
working with an existing database, this way of gathering information may be the
most appropriate for you.
1. In Page view, right-click the form, and then click Form Properties.
2. Click Send to database.
3. Click Options.
4. On the Database Results tab, in the Database Connection to Use
list, click the database connection for the database you want to use.
5. In the Table to hold form results list, click the table in which you
want to place the form results data.
6. Click the Saved Fields tab. When you click the Saved Fields
tab, all of the fields in your form are listed. For each field, you must specify
the database column in which you want to save the data.
7. In the Form Fields to Save list, click a form field, and then click
Modify.
8. In the Save to database column list, click the column in which you
want to save form field data, and then click OK. The columns listed are
from the table you specified earlier. Repeat steps 7 and 8 for each form field.
9. To save additional information (such as the site visitor's browser type,
remote computer name, timestamp, or user name) to your database, click the
Additional Fields tab, and repeat steps 7 and 8 for each field you want to
save.
Note If the current page is an .htm file, FrontPage prompts you to save
the file as an .asp file in order for the file to work correctly.
2) Set up a form to save form results to a file
One of the simplest ways to collect information about your site visitors is by
saving the form results to a text or HTML file. By default, the file is located
in _private, a hidden directory in your Web site. This directory is set
up so no one can browse to it, making it more secure. You can change this
location and file name as needed, however doing this isn't as secure as using
the _private directory. You also can select the format of the text file
and specify whether to include field names in the form results. In addition, you
can specify a second file in which to save results.
1. In Page view, right-click the form, and then click Form Properties.
2. Click Send to. A default file name and a location for the results file
are displayed in the File name box.
3. You can specify a different file to use by typing the new name and location
in the File name box, or by clicking Browse to locate the file.
4. Click Options, and then the File Results tab.
5. In the File format list, click the file format of the form-results
file.
6. Under Optional second file, you can specify a second file to contain
form results. You may want to specify one results file for input to a database
or spreadsheet and the other results file for readability.
To specify a second form-results file, type a name and location in the File
name box, or click Browse to locate the file that you want to use.
7. In the File format list, click the file format of the form-results
file.
8. Click OK twice to close the Saving Results and Form
Properties dialog boxes.
3) Set up a form to send form results in an e-mail message
You can send form results (data that a site visitor enters in your form) in an
e-mail message. Each time a site visitor submits a form, a message containing
the results of the form is sent to the e-mail address you specify. You can also
configure other options for the messages, such as the text for the Subject line
and the address for the From (Reply To) line.
Note The Microsoft FrontPage Server Extensions (FrontPage
Server Extensions: A set of programs and scripts that support authoring in
FrontPage and extend the functionality of a Web server.) or SharePoint
Team Services from Microsoft needs to have been configured in order to send form
results in an e-mail message. Contact your Web host or
Internet Service Provider (ISP) (ISP: A business
that provides access to the Internet for such things as electronic mail, chat
rooms, or use of the World Wide Web. Some ISPs are multinational, offering
access in many locations, while others are limited to a specific region.).
1. In Page view, right-click the form, and then click Form Properties.
2. Click Send to.
3. In the E-mail address box, type the e-mail address to which you want
to send the form results.
4. If you do not want results saved to a file in addition to being sent in
e-mail, clear the File name box.
5. Click Options, and then click the E-mail Results tab.
6. Then do one or more of the following:
* Set the format of the text by clicking a format in the E-mail format
list.
* Type the text that you want in the subject line of the e-mail message
in the Subject line box. If you leave this box blank, the default subject
line in the message will be Form Results.
* If you want the subject line of the e-mail message to contain the
results of one field from your form, select the Form field name check
box, and then type the name of the field in the Subject line box.
* If you want a specific e-mail address to appear as the sender of the
message (the From or Reply To line in the e-mail message), type the address in
the Reply-to line box.
* If your form contains a field that collects the site visitor's e-mail
address, you can use that address as the sender's address. In the Reply-to
line box, select the Form field name check box, and then in the
Reply-to line box, type the name of the form field.
4) Set up a form to save form results by using a custom form handler
You can use your own custom script ISAPI (ISAPI:
Internet Server Application Programming Interface. A Web server
application-development interface, developed by Process Software and Microsoft,
that can be used in place of CGI.), NSAPI (NSAPI:
Netscape Server Application Programming Interface. A Web server application
development interface developed by Netscape Communications Corporation.),
CGI (CGI: Common Gateway
Interface. A standard method of extending Web server functionality by executing
programs or scripts on a Web server in response to Web browser requests, such as
in form processing. Use of CGI can make a Web page more dynamic.), or ASP
as a form handler (form
handler: A program on a server that is executed when a site visitor submits a
form. A form in FrontPage is associated with a form handler.).
1. On the View menu, switch to Folders view. Right-click the
folder that contains your script, and then click Properties.
2. Select the Allow scripts to be run check box. If you don't want others
to be able to see files in this directory, clear the Allow files to be
browsed check box.
3. Click OK.
4. In Page view, right-click your form, and then click Form Properties.
5. Click Send to other, and then in the Send to other list, click
Custom ISAPI, NSAPI, CGI, or ASP Script.
6. Click Options.
7. In the Action box, type the URL (Uniform
Resource Locator (URL): An address that specifies a protocol (such as HTTP or
FTP) and a location of an object, document, World Wide Web page, or other
destination on the Internet or an intranet, for example:
http://www.microsoft.com/.) of the form handler.
8. In the Method list, click the method of submitting information to the
form handler:
* The GET method encodes the form's name-value pairs and assigns
the information to a server variable called QUERY_STRING.
The POST method passes the name-value pair directly to the
form handler as input.
* To use the default encoding method application/x-www-form-urlencoded,
leave the Encoding type text box blank.
Note If you use one of the form handlers (form
handler: A program on a server that is executed when a site visitor submits a
form. A form in FrontPage is associated with a form handler.) rather than
a custom script, the Microsoft FrontPage Server Extensions (FrontPage
Server Extensions: A set of programs and scripts that support authoring in
FrontPage and extend the functionality of a Web server.) must be
installed on the server on which your Web site is located.
Note By default, form results are saved to a text file.