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:

 

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:

  1. Open the page in Design view, and then apply the Custom Form Wizard. A dialog box appears.
  2. Complete the dialog box, following the instructions below for each of the four steps:
    · Connection and redirect information
    · Fields information
    · Form validation rules (if the MX Form Validation components have been installed).
    · SQL query.
  3. Click Finish when done.

Connection and redirect information

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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:

 

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, 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:

  1. 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).
  2. 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.