Adobe
GoLive 6 Dynamic Content Samples
Overview
Database Design
Topics
Messages
Create Topic
Manage Topics
Manage Messages
Delete Topic
Delete Message

text

A. Topic, username, and new message. B. Form submission buttons.

Content Sources

There is a single content source, the Messages table from the User Forum database. Since it is only needed for adding records, not displaying them, the query uses record filtering to avoid a potentially expensive database lookup. Here is what the content source looks like in GoLive:

text

The Match Pattern of -99999 does not match anything, so the content source is empty. The effect is to create a blank form.

A

The topic, username, and message text are all simple bindings. Since the content source is empty, all of the form fields are blank. They are correctly initialized to create a new record. There is no need to include a hidden field for the date, because the database is configured to automatically initialize MessageDate to the current date, today.

B

The Form Action for the post button is Add Record. The success URL is set to topics.php, so the user sees his new topic unless there is an error adding it. There is no failure URL, although a better design would include one to provide a useful error message.

The cancel button does not use a Form Action. Instead, it uses client side javascript to implement the cancel behavior:

onclick="document.URL='topics.php'

When the user clicks this button, he returns to the Topics page without making any changes to the database. The cancel button is a normal button, not a submit button.