In this article we describe how to insert a form into your page:
Place your pointer where you want to add the form.
On the Insert menu select Form and then select the form area. doing so will insert the following into your page
The Submit button will be used to enable users of the form to submit their data into the server. The Reset button will reset all fields in the form.
To add a check box to your form click
Click in the form where you want to place the check box then
On the Insert menu, point to Form, and then click
Checkbox. Repeat these steps for each of the fields you need to insert into your page. Repeat the previous steps for each of the fields that you want to add to your form, click here to view the fields and their usage.
Webmasters usually require a form on their website to collect information
from their visitors. For example you may want to create a newsletter and ask your visitors to subscribe. Subscription requires information about users such as name, email address and any other information that might interest you. Here are the steps to create a form (before creating the form its a good habit to create a form inside a
Lets create a table to insert our
Place the insertion point where you want to insert
On the Table menu, point to Insert, and then click
Set the properties to:
- Number of rows to 2
- Number of column to 1
- border size to 1
- Pickup the color you wand for the table border
- check the box “Collapse table border”
- specify the width of the table to 180
HTML CODE TO CREATE THE ABOVE
|<table border="1" cellpadding="0" width="180"
style="border-collapse: collapse" bordercolor="#336699">
Now in the first row we write the
title of our form
the second row for the form:
Create a the form
When you insert a form, Microsoft FrontPage inserts
a rectangular area outlined with a dashed line that
contains a Submit and a Reset button. Inside this
rectangular area, you can add text and form fields,
such as text boxes, option buttons, check boxes,
drop-down boxes, and push buttons.
On the Insert menu, point to Form, and then select
the fields you want to add to your form.
in our example we need to add two
Type first the label of the first
and click on the Shift+Enter to have one break line
then On the Insert menu, point to Form, and then
put the cursor after the textbox
then click on the Shift+Enter to have another break
line then type the label of the second textbox
"Your email" then click Shift+Enter to have a break
line. On the Insert menu, point to Form, and then
Set the properties for Textbox
Double-click the first textbox.
In the Name box, type "Name" to identify the First
TextBox and "email" for the Second Textbox.
For your form to work correctly, you need to use a
unique name for each form field.
If you want a default text to appear in the text box when a
site visitor first opens the form, type the text in
the Initial value box.
Now we have our Textboxes ready, note that for small form we don't need the Reset
button just delete that button.
Double-click on the Submit button. In
the Name box, type "submit" to identify submit
button and change the Value/label: to Subscribe Now
now we have a form that looks like this form:
Now when your visitor fill the
form and click on Subscribe Now what is going to
The form data get send
to your server, next we will describe how to collect and make use of these data.
Collect and store form data entered
by site visitors
One of the simplest ways to collect
information about your site visitors is by saving the
form results to a text or an 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 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.
In Page view,
right-click the form, and then click
- Click Send to.
A default file name and a location for the results
file are displayed in the File name
the folder _private is created in your server during
the FrontPage installation. The file form_results.csv can be changes to a name of your choice.
- 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.
in our example we use different file name let us
name the file sales_alerts
- you can Set up a the form
to send form results in an e-mail message
You can send form results 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. In the E-mail address box, type the
e-mail address to which you want to send the form
- Click Options,
and then the File Results tab.
- In the File format
list, click the file format of the form-results
file. in Our example we will use the Text
database using comma as separator "the extension .csv"
- 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.
- In the File format
list, click the file format of the form-results
- click the E-mail Results tab.
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
- Click OK twice
to close the Saving Results and
Form Properties dialog boxes.
The HTML file for our form will look like this:
<p align="center"><b>Sign up for sales
<p align="center">Your Name<br>
<input type="text" name="T2" size="20"><br>
<input type="text" name="T1" size="20"><br>
<input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset"
Note : To
test the functionality of your form, you must first
publish your Web site to a Web server.
Name the html page that has the code
to : example form.html then upload this file to your
server using FrontPage publish don't use a regular ftp
to upload the html file.
You can insert your form in any page
in your website.
Note that all the pages that have form should be published
using FrontPage to ensure a proper functionality of the forms.
publishing files and folders
After I publish my Web site,
some components don't work.
You may have published to a Web server
that does not have the most recent version of the
FrontPage Server Extensions from Microsoft or Microsoft
Windows SharePoint Services. Without the server
extensions, certain features will not work, such as most
form handlers and hit counters .
I want to publish a file that I
originally set as Don't Publish.
The Don't Publish command is a
toggle. To publish a file that is currently set to
Don't Publish, do the following:
- In the Folder List,
right-click the file you want, and then
click Don't Publish on the shortcut menu.
- If the Folder List is
hidden, on the View menu, click Folder List.
I republished a Web site with a guest book that
contained comments from site visitors, and now the
guest book pages are blank.
You should always publish your Web
site before you republish certain files that contain Web
components, such as guest book forms, hit counters , or
discussion Web sites. If you have created and published
a Web site that includes a guest book, and then later
update your Web site and republish all of your files,
your guest book will be replaced by a blank one.
Frontpage Hosting - Form
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
NSAPI : (NSAPI: Netscape Server Application
Programming Interface. A Web server application
development interface developed by Netscape
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
ASP (Active Server Page) A method for creating
programs that run on a Web server, first available on
the Microsoft Internet Information Server 3.0. See also
E-mail (electronic mail) A service for sending
messages over a computer network.
Form A set of data-entry fields on a page that
are processed on a server. The data is sent to the
server when a user submits the form by clicking on a
button or, in some cases, by clicking an image.
form field A data-entry field on a page. A user supplies
information in a field either by typing text or by
selecting a field.
Form handler A program on a server that executes
when a user submits a form. A FrontPage form is
associated with a form handler in the Form Properties
FrontPage Server Extensions A set of programs and
scripts that support FrontPage authoring and extend the
functionality of a Web server. The FrontPage Server
Extensions are available for the Microsoft Internet
Information Server and other popular Windows and UNIX
Web servers. If you are not sure if your Web server is
Hidden Field A form field that is invisible to a
user but supplies data to a form handler. Each hidden
field is implemented as a name-value pair. When a form
is submitted by a user, its hidden fields are passed to
the form-handler along with name-value pairs for each
visible form field.
line break A special character that forces a new
line on a page without creating a new paragraph.
Publish The process of making your FrontPage web
public on the World Wide Web or an intranet. You publish
your FrontPage web using the FrontPage Explorer.
Web server Web server: A computer that hosts Web
pages and responds to requests from browsers. Also known
as an HTTP server, a Web server stores files whose URLs
begin with http://.)
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.
Hit counters Hit Counter component: A component
in FrontPage that keeps track of the number of visitors
to a World Wide Web site.
Hosting | Domains
| Support |
& Condition |
Copyright © 2005 by
HostItWise.com Read our