Form-Based Elements & FeaturesForms add an element of interactivity to your Web site. The visitor enters information in one or more boxes or selects options, then clicks a button to make something happen. Tip Forms work with CGIs, which determine what the form does. Your Web server must support the CGI you want to use for you to include the form-based feature on your Web site. Here are a few examples of how forms can be used on Web sites. E-Mail FormsAn e-mail form gathers information from site visitors , then sends that information to a specific e-mail address. For example, Chrome Caballeros (http://www.chromecaballeros.com/) uses a very simple e-mail form to generate leads for its tour business (see Figure 6.2). Figure 6.2. This simple form e- mails contact information and comments to the Chrome Caballeros staff from prospective customers.
Database InteractivityForms can enable site visitors to access information stored in a database. Depending on how you set up the database interactivity, visitors can search and view database contents or add or modify database information. For example, Coldwell Banker Bob Nuth & Associates (http://www.wickenburgrealestate.com/) maintains a database of property listings that it can update at any time. Site visitors can access the database by clicking links with predefined search criteria or by entering information in a search form. The results appear in a list with some basic information (see Figure 6.3); the site visitor clicks an item to see its detail on another page (see Figure 2.1). Figure 6.3. The Coldwell Banker Bob Nuth & Associates Web site features a searchable database of property listings.
Search CapabilitiesIf your site has more than a handful of pages, you should consider including a search feature. This makes it possible for site visitors to search for and find specific information on your site. Search features work by combining a search CGI with an indexing program. Both run on the Web server. For example, on my server, I set up the WebSTAR Search Indexer program to automatically index the contents of one of my Web sites, wickenburg-az.com (http://www.wickenburg-az.com) every night. The program creates a database and the search CGI searches that for matches. It then displays a list of pages that match the search criteria (see Figure 6.4). Figure 6.4. A tiny search form appears in the navigation bar on the left side of each page on wickenburg-az.com. Using the form displays a Search Results page like this one.
Not all ISPs support the ability to include search features on Web sites. Some who do support it may charge an additional fee to implement it. Ask your ISP or Webmaster if you can include this feature on your site. Tip If you can't include a search feature on your Web site, consider creating an index or contents page that lists and describes all pages on your site, with links to each page. Guest BookA guest book enables site visitors to share their thoughts and opinions about the site with other visitors. It's a great way to learn what visitors think ”and make sure other visitors learn it, too. Beware! Guest books can work for you or against you. If someone doesn't like you, your company, or your Web site, they can say negative things in your guest book for the world to see!
Another problem that sometimes occurs with guest books is people using a guest book to ask questions about your company, its products, or its services. You can limit the chances of this happening by clearly stating how the guest book should be used. For example, on wickenburg-az.com (http://www.wickenburg-az.com/) the Guest Book New Entry Form page (see Figure 6.6) warns visitors not to use the guest book to ask questions. Figure 6.6. The Guest Book New Entry Form page on wickenburg-az.com includes the usual guest book fields, along with specific instructions.
Tip If you do include a guest book feature on your site, make sure you review all entries when they're entered. I set up my guest books so they automatically send a copy of new entries to me in e-mail messages. If an entry is unsuitable for the site, I know about it quickly and can remove it. Keep in mind that not all site visitors are interested in entering their comments in a guest book. Many believe that doing so will add them to some kind of junk e-mail list. If you do plan to use entry information for a mailing list, be sure to inform visitors. |