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 Language).
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.
The redirect server behavior
loads a new site page after a transaction is executed. For instance, users
could be automatically redirected to their inbox after they log in to
the website.
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.
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.
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.
Create custom transactions in one operation
Whenever you want to build an insert page that contains specific fields
which you can manually define, the Custom Form
Wizard is the right solution. The submitted information in the
form can be saved in the database
(by calling a stored procedure) or not. In the latter case, it could simply
be sent as an e-mail to where it is needed to be known.
This wizard is divided into three compulsory steps, based on the type
of data the user has to input. If MX Form Validation
has been installed, aside from the regular steps required in completing
the wizard, a new one will be displayed (as the third out of the four
steps). It consists in defining the validation rules for all the fields
included in the form generated by the wizard.
The Custom Form Wizard is accessible from
two locations:
The MX Kollection tab
of the Insert bar.
The Application panel,
Server Behaviors -> + -> MX Kollection ->
Forms -> Custom Form Wizard.
You can also build the custom form gradually using the form tools and
the Custom Transaction server behavior.
For more information, see Create
custom transactions in multiple steps.
To build the insert page with the Custom Form
Wizard, follow the next instructions:
Open the page in Design view,
and then apply the Custom Form Wizard. A
dialog box appears.
The first step into completing the dialog box requires the user to input
basic information about the transaction,
like the database connection and the page to which it will be redirected:
To set the dialog box options, follow the next steps:
In the Connection drop-down
menu select the database connection defined for your site; if you don't
have a connection yet, you can use the Define
button and create one now.
In the When finished, go to
text box enter the page to be opened after the record is inserted into
the table or click the Browse button to
select the file page. You can also use the InterAKT
Dynamic Data (the lighting bolt icon) to build the file name.
The five buttons in the lower part of the interface
offer the following functionalities:
· With the
< Back / Next
> buttons you can navigate through the wizard's steps.
· Click Finish when you are done configuring the wizard.
· Click Cancel to exit without the new settings to be
applied.
· The Help button brings you to this help page.
These buttons appear on all three interfaces of the Custom
Form Wizard.
Click Next to continue
with configuring the wizard.
Fields information
This dialog box allows you to add fields in your form. You can associate
database fields with form controls:
To set the dialog box options, follow the next steps:
In the Form fields area
specify the form objects you want to include on the HTML
form of the insert page. You have to add the fields manually, using
the Plus (+)
button. The Minus (-)
button is used to remove fields from the form.
You can change the order of the form objects on the HTML
form by selecting a form object in the list and clicking the up
and down arrows on the right top side of the dialog box.
Specify how each
data-entry field should be displayed on the HTML
form by selecting a row (single click) in the Form
fields area and entering the required information in the boxes
below the grid, as indicated below.
In the Label text box
enter a descriptive label to display beside the data-entry field. By default,
Dreamweaver displays the column’s name in
the label field.
In the Display as drop-down
menu select a form object to serve as the data-entry field for the current
selection in the grid. You can choose from the following list: Text field,
Text area, Menu, Hidden Field, Check box, Radio group, Password field,
Text, File field. To read the detailed description for each of these options,
click here.
Set the form object’s properties. You have different options depending
on how you want the form field to be displayed as.
You can use the Back
button to alter the table and redirect
information. If you do not wish to validate the user input, you can click
on Finish to add the custom form elements
to the page. If you want to continue configuring the wizard, click Next.
Form validation rules
This 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:
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, a MX Form
Validation trigger,
with a validation role, will be added to your page.
SQL query
This last step of the wizard offers you the possibility of editing your
own SQL query,
that would suit your needs the best:
To set the dialog box options, follow the next steps:
In the SQL query editable
area you can write an SQL query for the current transaction (only if there
is an active SQL connection). When putting together the query and choosing
fields from the current ones, you can use the InterAKT
Dynamic Data (the lighting bolt icon).
After completing the user interface, click on the
Finish button to apply the wizard, or Cancel to dismiss it without making any changes
to your page.