As with most of FrontPage's templates and canned features, using them limits your options for modifying form elements later. Read on to learn about working with the Form Page Wizard. Maybe you're looking for a form to gather feedback, or you'd like visitors to sign a guestbook, or identify themselves before viewing your site. You'll also see how to restrict access to a subsite (Planning Your Website's Structure) and how to create a discussion board.
Form Page Wizard
For those looking for some help when creating a complex form, FrontPage offers the Form Page Wizard. Remember "wizards" from back in Building and Managing a Website? The FrontPage page-creation tool that prompts you with questions and generates pages from your answers? Same thing goes with the Form Page Wizard.
That's all well and good, but honestly, by the time you respond to all the prompts, you could be halfway done creating your form manually with the Forms toolbar or menu.
Nonetheless, those who love a good wizard can follow the steps below for creating a form using this tool.
Launch the Form Page Wizard.
Select File » New and click "More page templates" in the New task pane. Double-click the Form Page Wizard to launch it.
Begin responding to the wizard's prompts.
FrontPage displays a prompt explaining how the wizard works. Click Next.
Select a question type.
In the next dialog box, FrontPage asks you to select what type of questions you want to include on your form. Click Add to see your choices. The dialog box in Figure 15-13 displays. At top is a list of question types, which really serve as form sections. For instance, the top of your form may include "Contact Info" while the bottom half features "Ordering Info." Select a question type from the top and then click Next. (You'll have a chance to select additional question types in a minute.)
Figure 15-13. Select a genre of questions from the list at top. In the bottom pane, FrontPage shows you what text it'll place on the page as a section header for that group of questions. You can edit this text here, or later, on the Web page itself.
Add Input options.
Depending upon what type of question you chose in the last step, FrontPage offers you a variety of fields to add to your form (see Figure 15-14). Turn on checkboxes for all those that you want to include and then click Next.
Add further question types, if you want.
FrontPage returns you to the first wizard screen, which now features the question type you chose in step 3 (see Figure 15-15). If you want to add another question, click Add and repeat steps 3 and 4. When you've added all the regions and fields you want the form to include, click Next.
Figure 15-14. Use this dialog box on the Form Page Wizard to select the fields you want to add to your form.
Figure 15-15. If you've added multiple question types to your form, you can use the Move Up and Move Down buttons to rearrange the order in which these sections will appear on your page.
Set presentation style.
FrontPage then prompts you to select page layout options. You can choose to have your fields organized in normal paragraphs, or in a numbered, bulleted, or definition list (see Formatting Paragraphs at the end of Working with Text for a refresher on list types).
If you have a very long form, you may want to let FrontPage add a table of contents to the top of the page. If your form is short, don't bother.
You can also have FrontPage lay out your form in a table, which helps create a cleaner looking page. Turn on the "Use tables to align form fields" checkbox, and click Next.
Select output option.
Here you tell FrontPage what to do with the data the form collects. You can have results appear in a Web page or be saved in a text file. (Refer back to "Saving Form Results" on Validating Forms for details on these options.) The last selection, "Use custom CGI script," is for those with advanced programming skills. If you don't have a custom script for saving results, you'll obviously steer clear of this choice. Select one of these options and then enter a name for the Web page or text file, if necessary. Then click Finish.
FrontPage creates your new form page and displays it in the document window (see Figure 15-16). Look over the form and make sure it's what you expected. You can edit this page as you would any other. Change text or add validation options as you wish.
Figure 15-16. This is the form that FrontPage creates from the wizard. The table of contents at the top includes links to each section of the form that is, each "question type" you chose in the wizard. Make sure to replace FrontPage's boilerplate explanation text with your own.
FrontPage comes with a few canned form pages that you can use for some commonly used forms, like collecting feedback from visitors to your site or creating a guest book they can leave comments on.
To create a page using any of these form templates, select File » New. Within the New task pane, click "More page templates," and then, within the Page Templates dialog box, select one of the choices described next.
This template creates a Web page with a form on it, designed to collect visitor feedback regarding things like suggestions or problems. Edit this page and configure the form as you would if you created the form from scratch. Results automatically go into a text file, but you can change this if you want. (See Validating Forms, "Saving Form Results" earlier in this tutorial.)
Selecting this template creates a form page containing one text area field for comments. When a visitor submits this form, results appear on the guest book page.
Guest books often attract spammers who'll fill your guest log with offers for Viagra and other unwanted solicitations. So, unless you really need it, think twice about adding a guest book to your site. If you do include one, try renaming the guestbook.htm page to something else. This stops a lot of automated postings, but won't solve the problem entirely.
The User Registration Form template lets you have visitors "self-register" to gain access to a subsite (Planning your Website's Structure). In other words, you can make them fill out a user name and password of their choosing to browse any files contained in the subsite. The advantage is that you can track visitors and see where they're going within your site, because these logins will be reflected in your usage reports. However, forcing viewers to create user names and enter information may turn some people away. If you want to collect visitor information, you may as well post a form somewhere to collect it.
FrontPage registration forms only work on Unix servers. If you're site is hosted on an IIS Web server, you're out of luck. Also, you must save the registration page outside your Web site, on the Web server. This means that you'll need to speak with your Web host (some of whom don't allow registration) or whoever is running your Web server.
To create a user registration form, you'll begin with server permissions. (Permissions are a set of controls on your live Web server that you use to tell the FrontPageServer Extensions who can enter your site and what they can do there.) Next, you'll create the form itself. The steps for setting up a registration form follow.
Securing a Subsite
How do I create a subsite that visitors can access only by entering a special user name and password that I give them?
The user registration form that you're about to learn how to create lets visitors self-register. This means that they can type whatever they want in the registration form. In exchange for providing information, they get access to your subsite.
In contrast, creating a secure subsiteone that visitors can only access using the magic user name and password combination that you've approvedis a slightly different process and does not require the use of the user registration form. You can limit access to a subsite by editing your site's permissions.
To create a subsite like this, follow the steps within Phase I only. After step 5, keep your remote site open and perform the actions discussed next.
Within the Administration page, click Manage Users. Click Add a User. Enter the user name and password you want to assign and select a role for the user. (For instance, if you just want visitors to your subsite to be able to browse pages, select Browser.) Click Add User. Repeat for each user you want to add, and then close your browser.
Phase I: Creating a subsite and setting permissions
To create a subsite and set permissions, do the following:
Create a subsite.
Open your Web site and create the subsite (Planning Your Website's Structure) to which you want to control access. The site you protect must always be a subsite. If you want to force visitors to register to enter your entire site, put it in a subsite. FrontPage needs the root folder of your Web site (the core folder that contains the Index1.htm or default.htm file) to house the registration form you're about to create. The form must live outside the folder to which you're restricting accessotherwise, a visitor wouldn't be able to see it or fill it out, and would therefore never get into the subsite.
Publish the subsite.
Before you publish, click Remote Sever Properties on the upper right of the document window, select the Publishing tab, and then turn on the "Include subsites" checkbox. If you don't, FrontPage won't publish your subsite along with the rest of your site. Then publish. (Forgot how to publish? Refer back to Publishing Your Website.)
Open the subsite on your live Web server.
While still connected to your live Web server, open the subsite in FrontPage. To do so, click the "Open your remote Web site in FrontPage" link within Remote Web site view (see Publishing Your Webiste for details) and double-click the subsite's folder. The subsite opens in a new instance of FrontPage.
Set permissions for the subsite.
With the subsite open, select Tools » Server » Permissions. You may be prompted for the administrative user name and password that your Web host or IT administrator gave you. Then the Permissions Administration Web page appears (see Figure 15-17). Click Change Permissions. Within the Change Subweb Permissions page, click Use Unique Permissions. Then click Submit.
Figure 15-17. FrontPage Server Extensions administration settings display on Web pages. You use settings on these pages to control who can access your site. You'll set permissions and administer your site using your Web browser.
Turn off anonymous access for the subsite.
All FrontPage sites automatically allow anyone to access them without identifying themselves, which you'll have to change, of course. At the top of the page, click the Administration link, and then click Change Anonymous Access Settings. Next to the "Anonymous access is" field, click Off. Click Submit and then click OK.
If you're trying to secure a subsite (with a secret user name and password) instead of creating a self-registration form, return to the box that precedes these instructions to complete your final step. (You don't need to create a registration form, so don't proceed to Phase II.)
You can close the site and end the connection to your remote Web server, if necessary.
Phase II: Creating the user registration form
To create the user registration form, do the following:
Open the subsite in FrontPage.
Create the registration form.
Open the subsite and select File » New. Within the New task pane, click "More page templates." Then, within the Page Templates dialog box, double-click the User Registration template. The form opens in the document window.
Replace boilerplate text with your subsite's name.
Select Edit » Replace and replace the text "name of your sub site" with the actual name of your subsite. (Refer back to Making a good Impression for help with replacing text.)
Configure registration form properties.
Right-click the form (anywhere inside the dotted-line rectangle) and select Form Properties.
FrontPage automatically configures form results to be sent to the Registration Form Handler. Don't change this setting.
Click Options, and set the following properties on the Registration tab:
Web site name. Type a slash (/) followed by the name of your subsite folder.
For the field name settings that follow, FrontPage makes automatic entries that do nicely, unless you have special needs.
User name fields. Type in what you'd like to call your user name field. If you're creating more than one user name field (splitting first and last name, for example), type in all field names separated by commas.
Password field. Enter the name of your password field. "Password" always works quite well.
Password confirmation field. It's always a good idea to make visitors type in a password twice, to make sure they haven't made errors. Type in the name of the password confirmation field.
Require password. Leave this checkbox turned on to force the visitor to enter a password longer than six characters.
URL of registration failure page. FrontPage creates a failure page automatically, so you can ignore this field. However, if you want to create a custom failure page, do so and enter its URL here.
Click OK, and FrontPage warns you that your new registration form must be saved in the "root Web." Click OK.
Save the form page in the root Web site (parent folder to the subsite).
User registration forms must live in the root Web site. A site's root directory is the core folder where the Index1.htm or default.htm page lives. For example, when a visitor types in http://yoursite.net, the file he sees lives in your site's root folder. The path to a subsite would be something like http://yoursite/secretfolder. If secretfolder is the subsite you're protecting, the registration form must be saved in the yoursite root Web folder. Name the file something like regform.htm. (As always, include no spaces, capital letters, or special characters in the name.)
Publish your root Web site.
Test your registration form on the live Web server.
Discussion Web Site Wizard
If you want to create a discussion site, in which people can post and reply to messages, FrontPage offers you a wizard that walks you through the process. To do so:
Open the site in which you'll place the discussion site.
A discussion site should be a subsite within an existing Web site. You can create the subsite and discussion component together, if you skip ahead to step 2. If you've already created the subsite that'll hold your discussion, open it in FrontPage.
While FrontPage lets you create a discussion group within your root Web site, this is a bad idea, because every time you publish, FrontPage overwrites your discussion pages, obliterating entries by visitors. Create a special subsite to hold your discussion, and after you publish it the first time, exclude it from publishing (Publishing Your Site).
Launch the Discussion Wizard.
Select File » New, and in the New task pane, click "More Web site templates." If you're creating a discussion within an existing Web site, turn on the "Add to current Web site" checkbox and double-click the Discussion Web Site Wizard. If you're creating a new subsite to hold your discussion, add the new folder name at the end of your site's directory path, which appears in the "Specify location" field.
Select all the components you want your discussion to include and then click Next.
To create a user-friendly discussion site, keep all these checkboxes turned on:
Submission form is mandatory, because this is the page visitors will use to enter their messages.
Table of Contents provides an index page with a table of contents, which includes links to each message visitors post.
Search Form lets visitors search all messages for special text.
Threaded Replies groups messages together with related replies, which helps viewers a lot more than chronological order (which is what you'll get if you turn off this checkbox).
Confirmation Page lets visitors receive a confirmation page after they've posted a message.
Name the site and folder.
Name the discussion site (as usual, don't include capital letters, spaces, or special characters, and keep it short). Name the discussion folder. You can keep the name FrontPage has automatically entered here or type your own, but it must begin with an underscore andyou guessed itcontain no spaces, capital letters, or special characters. Click Next.
Select form input fields.
Choose one of the three options FrontPage presents (see Figure 15-18) and click Next.
Figure 15-18. Choose from three sets of form field groups for your page. Don't worry, you're not limited to just these fields. Once the wizard creates the form page (which always ends in _post.htm; see the file list at the end of this tutorial), you can add more fields to it. Category and Product lists are drop-down lists that FrontPage populates with placeholders like Product1, Product2, and so on. You can also edit these lists through the form page.
Tell FrontPage whether or not you're going to set permissions on your discussion site and then click Next.
See Section 22.214.171.124 to learn how to restrict access to a subsite.
Select the order in which you want to display messages and then click Next.
Tell FrontPage whether you want the Table of Contents page to be the home page for your site.
If you're creating your discussion within a new site or a subsite, you should click Yes.
If you're creating your discussion in an existing site, clicking Yes overwrites your Index1.htm file, which is probably not what you want, so click No.
Configure search form results.
If you elected to have a search form in your discussion site, FrontPage asks you what information you want visitors to see. Make a selection and then click Next.
Select a frame option.
If you want to display the discussion using frames (Frames Tutorial), click some of the choices here, and FrontPage previews the layout on the left. Using frames lets visitors see the table of contents and messages simultaneously, but frames come with some drawbacks (see When to use Frames). If you don't want to use frames, select No frames and click Next.
Create the discussion Web site.
Click Finish on the last dialog box (which contains no choices).
FrontPage adds a bunch of files to your site. These file names begin with the name you gave your discussion in step 4. For example, say you created a discussion for growers to share information on kiwi fruit. If you named your discussion "kiwi," you'd find pages named:
kiwi_toc.htm (table of contents). If your discussion is part of another site, link to this page to bring visitors to the discussion. This page has all the links visitors need to search and post.
If your discussion has framed pages, link to kiwi_frm.htm as the discussion's home page instead. With frames, you'll see additional welcome pages, too: kiwi_welc.htm and kiwi_tocf.htm.
kiwi_post.htm. The page containing the form visitors fill out to post a message. If you elect to include a Category or Product list when you create the discussion site, open this page to access those form fields. Double-click on the form field to add selections to the drop-down list.
kiwi_cfrm.htm. The confirmation page visitors receive when they add posts.
kiwi_search.htm. This lets visitors search messages within the discussion.