- Understanding Forms
- Creating a Form
- Inserting Form Objects
- Modifying Text Fields and Text Areas
- Modifying Radio Buttons and Check Boxes
- Modifying Lists and Menus
- Modifying Buttons
- Inserting an Image Button
- Making Form Objects Dynamic
- Using Tables to Control Forms
- Validating Forms
- Creating and Editing a Jump Menu
- Viewing Example Code for Forms
Creating a Form
Just because Dreamweaver makes the initial creation of the form easy for you, it doesn’t mean that you shouldn’t think about its construction. One of the rules in creating forms is that you’re designing the form for the person who is filling it out... not for you. The form should be as simplistic as possible with easy to understand instructions. When they make a mistake (not filling in a field), there should be a way to tell that person a mistake was made, and what to do to correct it. Studies show that the more difficult the form, the less likely that people are going to spend the time to fill it out. There are two stages in the creation of a form: The initial insertion of the form, and then populating the form with text and form objects.
Create a Form
- Create a new HTML document, or open an existing one.
- Click to place the insertion point where you want to insert a form.
- Insert the form using one of the following options:
- Click the Forms tab on the Insert panel, and then click the Form button.
- Click the Insert menu, point to Form, and then click Form.
An empty form appears with a dotted red outline.
- Open the Properties panel.
- Click the red form outline to select the form.
- Type a name to identify the form for reference purposes with a scripting language.
- Enter the path to the page or script that processes the form data, or click the Browse For File button to select a file (if you don’t have this information, you can add it later).
- Click the Method list arrow, and then select one of the following options:
- Default. Uses the browser’s default setting to send the form data to the server. Typically the default is the GET method.
- GET. Appends the value to the URL requesting the page.
- POST. Embeds the form data in the HTTP request.
- Insert the form objects you want and specify the information in the Input Tag Accessibility Attributes dialog box. When you create form objects, follow these guidelines:
- Unique Names. Use a unique name that identifies the object for scripting purposes. Avoid using spaces or special characters.
- Layout. Use line and paragraph breaks, formatted text, and tables to design the form layout.