Create NeXTensio Form Wizard

In order to create a form that allows performing insert and update operations on a given table, you can use the Create NeXTensio Form Wizard. It is a good pair to the NeXTensio list, as it can be used to perform multiple operations based on the existence of an URL parameter. The wizard adds all the elements needed in order to build a fully functional form that will perform all three operations: add, modify and remove records.

The Create NeXTensio Form Wizard is accessible from two locations:

 

This wizard will create several elements for you:

Before using the Create NeXTensio Form Wizard, you should have a correctly configured testing site, as it will be required for the database connection setup step.

The wizard contains 3 or 4 steps, depending on whether MX Form Validation is installed or not:

  1. In the first step define the data that will be used.
  2. In the second step define which fields are to be displayed in the form.
  3. If the third step (out of 4) is available, set the validation rules for each field.
  4. In the fourth step set some specific form properties.
Note: You can only create one NeXTensio form per page.

Step 1 - Select a table to work with

To set the dialog box options for the first step of the wizard, follow the instructions below:

 

  1. In the Connection drop-down menu select the database connection you have created for your site. If there are no connections available, you can click the Define button to create a new connection.
  2. In the Table drop-down menu select the database table retrieved through the selected connection, table that contains the data to manipulate in the form.
  3. In the Primary key column drop-down menu select the table field which is set to be the primary key. This field contains unique data and is used by default to check against URL parameters.

    Note:
    If in the corresponding list you chose to get data from an advanced recordset (more than one table), make sure you select the database table that contains the primary key selected in the list, and of course, set the same primary key column as in the list.
                                   
  4. The Numeric check-box sets the primary key type. It is automatically refreshed when a new field is selected in the Primary key column drop-down menu.
  5. 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 are common to all steps of the Create NeXTensio Form Wizard interface.
  6. Click Next to continue with configuring the wizard.

Step 2 - Configure the form fields to use

To set the dialog box options for the second step of the wizard, follow the instructions below:

 

  1. In the Form fields grid, you can define what table columns will appear in the form. You can add or remove elements, by clicking on the Plus (+) and Minus (-) buttons on top of the grid. Also, you can change the order columns are displayed in, by pressing the Up (^) and Down (v) buttons.
  2. Specify how each data-entry field should be displayed in the NeXTensio form by selecting a row (single click) in the Form fields area and entering the required information in the boxes below the grid.
  3. In the Label text box enter a descriptive label to display beside the data-entry field. By default, the column’s 'generic name' is displayed (MX Kollection 3 removes the part in the column name that starts with "_" and capitalizes the first part).
  4. In the Show on drop-down menu select one of the three available options:
    · Insert and Update - if you want the current field to be available both when you insert or update records.
    · Insert only - if you want the current field to only be available only during the insert operation.
    · Update only - if you want the current field to only be available only during the update operation (you can modify the value of this field).

    Note 1:
    Say a form field is set to show only on Insert and it is also required. As expected, it will not show on Update (it being required will be ignored). If you are in an Update form (coming from the corresponding list), and you hit the Update button, no error will be thrown. But if you hit the Insert as new button, an error will occur since that missing field is required (a field set as required is actually required on the transactions on which it shows).

    Note 2:
    If a form field is set to show only on Update, during an Insert transaction for that form, the NULL value will be stored in the respective database table column.
  5. In the Display as drop-down menu select one of the available options: Text field, Text area, Menu, Hidden field, Checkbox, Radio group, Password field, Text, File field. Depending on your selection, the interface may change. Get all the needed information about these options from here.

    Note:
    If in the validation step, you set Password and File fields as required, they will only be required in the insert operation, and not in the update operation also.
  6. The Char width text box is only enabled when the current form field is displayed either as Text field or Password field. In this case, enter the number of characters that can be displayed at one time in the current form field.
  7. The Max chars is also only enabled when the current form field is displayed either as Text field or Password field. In this case, enter in the text box the maximum number of characters accepted in that form field.
  8. Click Next to continue with configuring the wizard.

Step 3 - Form validation rules

This step presents a way to validate all form elements. For instructions on completing this dialog box, see Form Validation in wizards.

Step 4 - NeXTensio Form Properties

To set the dialog box options for the fourth step of the wizard, follow the instructions below:

 

  1. In the Move up/down column drop-down menu select the numeric table column that stores the records order. If you did not use an order field in your table, leave this drop-down menu to the None value.
    If you select a table column for the records order, the form will automatically generate its value as being the maximum value of all existing entries in the order column + 1 (plus one). This column will not be displayed as a form field in browser (even if it was listed in the Form fields grid on step 2) since it will automatically get a value. This ensures that there will be no problems with the element's order.
    Through the NeXTensio list, this order in the database can be easily changed.

    Note:
    If you specified a table column in the Move up/down column drop-down menu when creating the related NeXTensio list, the same column must be selected in the respective drop-down menu of the NeXTensio form. For technical details about selecting the Move up/down column in the NeXTensio list and form, please see the following topic: Move up/down does not work for newly inserted records.
     

  2. The Current skin used in your site (in all the pages included, not only the current one) has its name displayed in bold text. The Change skin button offers the possibility of choosing another skin out of the available ones (aqua, kollection, arktic, formal) or None, if you don't want to use any skin:



    You can preview the chosen skin in the image provided along with the selected skin. For more details, read CSS Skins.

  3. In the Duplicate buttons drop-down menu select one of the 2 possibilities:
    · Yes - if you want the action buttons to be displayed both in the form's footer and header.
    · No - if you want the action buttons to be displayed only in the form's footer.
    This field is similar to the one with the same name in the NeXTensio list.

  4. In the Display as grid drop-down menu select one of the 2 possibilities (when editing multiple records):
    · Yes - if you want the records to be shown in a table that on each row displays the values of a single record (each field in a cell).
    · No - if you want the records values to be grouped and displayed one group below another.

  5. In the Copy down value drop-down menu select Yes if you want the form to present a button through which the first value (when editing multiple records) can be extended and populate the cells below it. Select No if you don't want the first value to propagate.

  6. In the Add "Insert as new" button drop-down menu select Yes if, in your form, you want a button that would insert a new record starting with the values stored in another one (values that are updated). This functionality is similar to one present in most software applications, namely the File / Save as property.

  7. When you are done configuring the wizard, you can click the Finish button to close the dialog box and add all the elements into the page.

 

After the wizard configuration is finished, and the results are applied onto the page, several translators are shown in Dreamweaver's Design View. A translator is in fact visual aid corresponding to a code block behind the action, using simple to understand names (e.g. the Display error message translator is shown instead of the code that will display the error message - if any).

The Form title itself is part of a translator (the Show If translator), because the same form can perform either an insert or an update, and the correct title has to be shown for each. Translators do not appear in the final page, when it is viewed in the browser. The page containing the form created above, looks as in the following image:

 

And this is how the Server Behaviors tab of the Application panel looks like after applying the wizard (with the settings above) in an empty page:

 

To change any of the form properties at a later time, you can double-click the NeXTensio Form Layout server behavior (inserted by the wizard) or apply the Manage NeXTensio Form Wizard command, accessed from the Insert bar -> MX Kollection tab.

To learn about the form's behavior in the browser, see NeXTensio Form browser behavior.

Frequently Asked Questions