Dreamweaver MX ASP Tutorials Macromedia Dreamweaver MX

Create a Feedback Form - Step II

You should now have the feedback.asp page open.

I guess I should mention something about the database design at this point. The following image is a view of the Contacts Table in Design View of Microsoft Access. I used the field names that you see so it would be easier when it came time to putting the Feedback form on the page.

Design View

25. Click inside the contentLayer and type Feedback Form and hit the enter key. Place your cursor inside Feedback and change Format to H1 in the Property Inspector.

26. Click in the line below Feedback Form and then Insert > Application Objects > Record Insertion Form and use the following settings in the Record Insertion Form. Be sure to click on the ContactID field and then the (-) sign to delete it. It is the Primary Key for the table and is set to AutoNumber. Also click on the FirstName, LastName and Address1 fields and change the Label in the Label box. Also be sure to make the Comments a textarea in the Display As box.

Record Insertion Form

27. Click OK.

28. Click in the top left hand <td> of the table that was created and then highlight all the cells in the left hand side of the table. Right-click in the highlighted area and select CSS Styles > tblData.

29. Save the feedback.asp page and close it.

30. Open the response.asp page.

31. Type Thank you! and hit the enter key to create a new paragraph.

32. Click inside Thank you! and change Format to H1 in the Property Inspector.

33. On the second line type, Thank you for submitting the form. and hit the enter key to create a new paragraph.

34. On the third line type, Someone from The Food Store will contact you if necessary.

35. Save the response.asp page.

That is all there is to creating a feedback form that inserts a new record in the database. Next I will show you how to use CDONTS to also email the form results.

Click here to continue the tutorial.