You can use a Record Insertion Form application object to create a form that allows visitors to enter data into a database. The application object lets you select which fields to include in the form, label the fields, and select the types of form objects to insert. When a user enters data in the form fields and clicks the submit button, a new record is inserted in a database. You can also set a page to open after a record has successfully been submitted so the submitter knows the database was updated.
In the Files panel, locate the file named comments-add and double-click the file to open it.
The document opens in the Document window.
Place the insertion point in the document at the end of the text paragraph in the main column, after the word possible; then press Enter or Return to place the insertion point where the application object will be inserted.
To add a record insertion object to your page, do one of the following:
In the Insert bar's Application category, select Record Insertion Form Wizard from the Insert Record pop-up menu.
Select Insert > Application Objects > Insert Record > Record Insertion Form Wizard.
The Record Insertion Form dialog box appears.
In the Data Source (ColdFusion) or Connection pop-up menu, select connTrio.
If a user name and password are associated with the data source or connection, enter them. If you didn't provide a user name or password when you set up the data source or connection, leave these boxes blank.
In the Table pop-up menu, make sure COMMENTS is selected.
Click the Browse button next to the After Inserting, Go To text box or (for ASP.NET) the On Success, Go To text box.
In the dialog box that appears, select the file named comments-view and then click OK to close the dialog box.
After the visitor enters a comment, they'll see the page that displays all the comments. In a larger-scale web application, you might instead show a page that thanks the visitor for commenting and tells them that you'll contact them with an answer soon.