Sunday, September 28, 2008

Forms in dreamweaver

In Dreamweaver CS3, you can check form input for the following types of form fields:
  • Text fields. The most common type of form field, the text field is a simple one-line box used to collect information like names, e-mail addresses, zip codes, search terms, and so on. If a particular piece of information is required -- like a last name -- you can prevent a form from being submitted if the user doesn't type anything into that field. In addition, you can make sure that the information a user types into a text field is in the correct format; for example, a correctly formatted e-mail address. Dreamweaver CS3 offers 14 validation options, including e-mail address, zip code, phone number, URL, and time.
  • Text area. A text area field is usually used to collect long text entries, such as comments, reviews, or blog entries. Not only will Dreamweaver let you make sure that a text area is filled out, it can also enforce a minimum and/or maximum number of letters. For example, you might want to limit feedback on a "Comments" field to 400 letters, both so it's easier for you to go through all your Web site feedback and to keep your site's database from being overloaded with too much data.
  • Check boxes. Providing a simple yes/no option, a check box form field is perfect for multiple choice questions: "select your 3 favorite desserts," for example. Using Spry validation, you can enforce a minimum number ("pick at least 2 options") and/or maximum number ("pick no more than 3") of selections.
  • Pull-down menus. A pull-down menu is a compact way to present a lot of options in a single line; for example, a list of states, counties, or districts. Dreamweaver CS3 lets you make sure the user has actually made a selection from the menu before submitting the form.