Collect and store form data entered by site visitors
By default, form results are saved to a text file.
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 , the
Microsoft FrontPage Server Extensions (FrontPage
Server Extensions: A set of programs and s 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.
Choose one of the following:
Create
a form to submit information to a database
From a web site that has an existing database connection,
do the following:
- On the File menu, point to
New, and then click
Page or Web.
- In the New Page or Web
task pane (task pane: A
window within an Office application that provides commonly
used commands. Its location and small size allow you to use
these commands while still working on your files.),
under New from Template,
click Web Site
Templates.
- Click
Database Interface Wizard, and then click
Add to current Web.
- Click OK.
- In the
Database Interface Wizard dialog box, select
Use an
existing database connection, and then select a database
connection from the drop-down list.
- Click Next.
- Select the table or view you would like to use for the
database connection, and then click
Next.
- If you want to modify a form field, do the following:
- Select a value in the
Edit form field
type list, and then click
Modify.
- Select a different value in the
Form field input
type list.
Note If you select
Option Button as a
form field input type, be sure to select a value under
Number of options.
- Click OK, and then click
Next.
- Select Submission
Form, and then click Finish.
Microsoft FrontPage creates:
- A page titled "Submission Form," which it opens it in
Page view.
- A folder called /Data source_interface/record
source (if it doesn't already exist) to store the
results page.
Create
a database with Microsoft FrontPage to save form results
- In Page view, right-click
the form, and then click
Form Properties on the shortcut menu.
- Click Send to
database, and then click
Options.
- You will be prompted to to pick a valid database
connection and table in which to store the results of the
form. Click OK.
- On the Database
Results tab, click
Create Database.
FrontPage creates a Microsoft Access database.
After the database has been created, a confirmation
message displays the name of the database and its location
in your web site. For example, /fpdb/Form.mdb means the
database is named Form, and is located in the /fpdb folder
created by FrontPage in the current web site.
- Click OK.
FrontPage automatically selects the new database as the
database connection to use and selects the table to store
the form results in.
- Click OK, and then click
OK again.
Note If the extension of the current page is .htm,
FrontPage prompts you to rename the file with the .asp
extension in order for the file to work correctly.
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.
- In Page view, right-click
the form, and then click
Form Properties on the shortcut menu.
- Click Send to
database.
- Click Options.
- On the Database
Results tab, in the
Database
connection to use box, select the database connection
for the database you want to use.
- In the Table
to hold form results box, select the table in which you
want to place the form results data.
- 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.
- In the Form fields
to save box, click a form field, and then click
Modify.
- In the Save to
database column box, specify 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.
- 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 extension of the current page is .htm,
FrontPage prompts you to rename the file with the .asp
extension in order for the file to work correctly.
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. You can change this location and file name
as needed. You can select the format of the text file and
specify whether to include field names in the form results.
You can also specify a second file in which to save results.
- In Page view, right-click
the form, and then click
Form Properties on the shortcut menu.
- Click Send to. A default
file name and a location for the results file are displayed.
- 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.
- Click Options, and then
click the File Results
tab.
- Set properties for the results file as needed.
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 or SharePoint Team Services
from Microsoft need to have been configured in order to send
form results in an e-mail message. Contact your web host or
Internet Service Provider
(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.)(ISP).
- In Page view, right-click
the form, and then click
Form Properties on the shortcut menu.
- Click Send to.
- In the E-mail address
box, type the e-mail address to which you want to send
the form results.
- If you do not want results saved to a file in addition
to being sent in e-mail, clear the
File name box.
- Click Options, and then
click the E-mail Results
tab.
- Then do one or more of the following:
- In the E-mail format
box, set the format of the text.
- In the Subject line
box, type the text that you want in the subject line of
the e-mail. If you leave this box blank, the default
subject line in the e-mail will be "Form Results."
- If you want the subject line of the e-mail to contain
the results of one field from your form, select
Form field name,
and then type the name of the field in the
Subject line box.
- In the Reply-to line
box, if you want a specific e-mail address to appear as
the sender of the e-mail (the From or Reply To line in the
e-mail), type the address.
- 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
Form field name,
and then in the Reply-to
line box, type the name of the form field.
Set
up a form to save form results using a custom form handler
You can use your own custom (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. ), or
CGI (CGI: Common Gateway
Interface. A standard method of extending Web server
functionality by executing programs or s on a Web server
in response to Web browser requests, such as in form
processing. Use of a CGI can make a web page more dynamic. ))
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.).
- On the View menu, switch
to Folders view.
Right-click the folder containing your , and then
click Properties on the
shortcut menu.
- Select Allow
s to be run. If you don't want others to be able
to see files in this directory, clear the
Allow files to be
browsed check box.
- Click OK.
- In Page view, right-click
your form, and then click
Form Properties on
the shortcut menu.
- Select Send to other,
and then in the drop-down box, click
Custom ISAPI, NSAPI, CGI, or ASP .
- Click Options.
- 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/.)
to the form handler.
- In the Method box,
select the method of submitting information to the form
handler:
- To use the default encoding method
"application/x-www-form-urlencoded," leave the
Encoding type text
box blank.
Note
- You must publish your web site to a web server that has
the Microsoft
FrontPage Server Extensions or SharePoint Team Services
from Microsoft installed. Ask your web administrator or
Internet service provider whether this software is
installed on your web server. Once the web site is
published, click
Preview in Browser
to test the form. published, click
Preview in Browser
to test the form.
- The server extensions do not need to be installed on
your web server in order for you to use a custom .