Understanding update actionsForm actions cause some action to occur when a form submit button is pressed. Generally, the action affects the record or records that are displayed in the form. GoLive provides five actions (Update Record, Add Record, Delete Record, Clear Form Data, and Copy Form Data) that can be attached to form submit buttons. There are also some update actions specific to the GoLive e-commerce Custom Merchant feature. In addition to the predefined actions, new actions can be defined and added to a site using the GoLive extensibility mechanisms.
There are a number of different situations that can arise when creating pages with forms displaying records. The page can be designed to display a single record. In this case, you can place a form action button such as Clear (form action = Clear Form Data) to create a blank form for later insertion of new records. You can place a form action button such as Copy (form action = Copy Form Data) to create a new form filled in with the current data, but ready to be inserted into the database as a new record. You can place a form action button such as Update (form action = Update Record) that takes the data from the form, and writes it back to the database (into the same record from which it came). You can place a form action button such as Add Record (form action = Add Record) that creates a new record in the database using the data that is on the form. Finally, you can place a form action button Delete (form action = Delete Record) that deletes the current record in the database. ![]() Form actions attached to buttons let you edit records in an online database: A. Clear Form Data creates a blank record. B. Update Record updates a record with any changes you've made. C. Copy Form Data creates a new record with data from the current record. D. Add Record creates a new record in the database. E. The online database file stores the records. Forms may also display more than one record. This can be done by placing a table in the form, placing form fields in a table row, binding the form fields to fields of a content source, and then setting the Repeat Rows property of the table in the Dynamic Bindings palette. If you have more than one record shown on the same form, the Update Record form action updates all of them. This allows you to easily create pages from which a number of records can be updated in a single operation. Note: Actions Clear Form Data, Copy Form Data, and Add Record and Delete Record are not allowed from a form that shows more than one record. To create a form connected to a content source:
To add a form action to a page:
When creating dynamic content pages that contain forms, you'll need to keep the following general principles in mind: Building forms on a dynamic content site doesn't differ substantially from creating forms on regular sites, but the GoLive Dynamic Content module does let you construct pop-up menus, list boxes, and radio button groups dynamically, populating them with names and values from an online database. Here are several examples you can study and customize for your own sites. |