The basic building blocks of an update page can be added in a single operation using the Update Record Form Wizard. The wizard adds an HTML form and an Update Transaction server behavior A server behavior is a reusable component for server-side development. They add blocks of code to your pages for accomplishing specific tasks. Dreamweaver comes with several default server behaviors and the InterAKT extensions add many more to this list. to your page. The form objects are laid out in a basic table, which you can customize by using the Dreamweaver page design tools (make sure all the form objects remain within the form’s boundaries). To edit the server behavior, display the Server Behaviors list (Window -> Server Behaviors) and double-click the Update Transaction server behavior.
You can also add the building blocks separately by using the form tools and the Server Behaviors tab of the Application panel. For more information on building an update page in multiple steps, see Update Record Transaction.
The Update Record Form Wizard is accessible from two locations:
The purpose of this wizard is to build a page that enables users to update records in a database A database refers to data organized and stored on a computer that can be searched and retrieved by a computer program. Most industrial-strength and many smaller database applications can be addressed using SQL (Structured Query A query is a SQL command that will extract information from the tables of a database. Essentially, a query is a request for information from your database. Language). table. This wizard is divided into two compulsory steps, based on the type of data the user has to input. If MX Form Validation has been installed, an additional step will need to be completed. This new step consists in defining the validation rules for all the fields included in the form generated by the wizard.
To build the update page with the Update Record Form Wizard, follow the next instructions:
The first step into completing the dialog box requires the user to input basic information about the transaction A transaction is a group of SQL statements whose effects are logically connected. Anything from simple queries to inserting, and deleting operations can be considered a transaction, as well as more complex groups of several statements which accomplish a specific task., like the table to be updated and the page to which it will be redirected:
To set the dialog box options, follow the next steps:
This dialog box allows you to define exactly which fields get which data and where they get it from. This is where you will determine how an input for a specific field will be displayed as:
To set the dialog box options, follow the next steps:
This last step of the wizard configures the validation rules for each of the form input fields. You can define a rule for each form element, so that bad input will be avoided:
For instructions on completing this step, see Form Validation in wizards.
Remember that this step appears only if you have the whole MX Kollection 3 package installed, or even only MX Form Validation. In this case, an Validate Form trigger A trigger is a SQL procedure that performs an action when a transaction (INSERT, UPDATE, DELETE) occurs. You can use triggers to perform validation of input data, to automatically generate a value for a newly inserted row, to read from other tables for cross-referencing purposes, or to support alerts through e-mail messages., with a validation role, will be added to your page.
Note: If in the first step of the wizard you have selected the user table that is also set in the Login Settings section of the Control Panel, and you've also set the password column to be displayed as a password field, the following will happen:
Three different text fields will be generated for the password column: old password, password and re-type password.
Two additional server behaviors will be added to the page:
· The Check old Password server behavior.
· A throw error trigger, that verifies if the old password and the re-type password fields match:
If all of the password checks are successful, the update transaction is completed.