CodeCharge Studio

Record Form Overview

Record forms are used to add, edit or delete database content. By default, a Record form has an HTML Form element, a number of controls that can submit values as well as four buttons (Insert, Update, Delete and Cancel).

The display of the four buttons on a Record form is controlled programmatically so that only the applicable buttons appear at the right time when the page is viewed live. For instance, if no record data is retrieved from the database, only the Insert and Cancel buttons will appear since you can't update or delete a non-existent record. On the other hand, if a record is retrieved and displayed in the form controls, the Update, Delete and Cancel buttons are shown but not the Insert button.

The illustration below shows a basic Record form. This form is created when the Record option in the Forms tab of the Toolbox is clicked. The form has a title, a column for the field captions and another column with controls where the database content is displayed and can be altered. Notice that unlike the grid form, a Record form has an HTML form element.

The Record component has four possible operations: Read, Insert, Update, Delete. Any of these operations may be disabled during the runtime using a corresponding property.

Note: In the generated code the Read operation is disabled if the Insert operation is enabled, but the Update and Delete operations are disabled. In all other cases the Read operation is enabled. It can be specified in the allowRead Run-time property in the Page AfterInitialize event.

For a detailed explanation of the Record form, pease refer to the Record Form section of the User's Guide.

See also:

Record From Reference

On-line, printable versions and updates