In this section of the tutorial, you will build the contact form. It will save messages into the database, through the connection you've created when planning out the application.
The Insert Record Form Wizard user interface opens, allowing you to set options regarding the table, form elements and rules for validating the user input. You can follow the steps below, or simply use the images as a guideline.
In the After inserting, go to text-box, you'll have to enter the thankyou.html file. Either type the file name, or use the Browse... button to locate it.

Figure 3. Insert Record Form Wizard Step 1
Since the department information is stored in a database table, you have to create a recordset to retrieve it. Just hit the Add Recordset button, and use it to retrieve all of the departments from the department_dep table:

Figure 4. Create a recordset
Once you've set up the recordset, hit the OK button. Now you can associate its values to the menu. To do so, click on the Menu Properties button and set it to retrieve the menu values From Database:

Figure 5. Set menu properties
Once you click on the Radio Group Properties button, you open a dialog box where the labels and values for each radio button in the group can be set. Enter the "Phone", "E-mail" and "Regular mail" as labels, and 1, 2 and 3 as values. Hit OK to return to the wizard:

Figure 6. Set radio button options
The last field to set is the message. Set it to be displayed as a Text area, instead of a Text field, to allow visitors enter more text. You can then move on to the last (optional) step of the wizard: validation rules.

Figure 7. Insert Record Form Wizard Step 2
For the e-mail address field, aside checking the "Required" checkbox, select the "E-mail" option in the Validation format drop-down menu:

Figure 8. Insert Record Form Wizard Step 3
You will notice all of the elements it adds to the page: all of the HTML form elements, the recordset created for the menu, the Form Validation triggers, and the Insert Record transaction. The finished form should look like the image below (in the Dreamweaver's editable area):

Figure 9. Preview form in Dreamweaver
Above the actual form, a translator indicates the place where the main error message will be displayed if the transaction fails. After you save the page, you can also test it, by loading it in your browser and submitting a message.

Figure 10. Preview form in browser
Note: the red * showing that the field is required, as well as the "(E-mail)" mark, showing what kind of data you must enter.
Before moving on to the next section, there is one more thing left to do in order for the contact form to be usable: create the thankyou.html page. Open it in Dreamweaver, and type in an appreciation message for their opinion. Also, you should add a link to the index page, for those who still have things to say. A sample page could look like this:

Figure 11. Preview thank you page in browser
In the next topic, you will enhance this page so that when a visitor submits a message, it will be automatically sent to the corresponding department.