Create the basic form

In this tutorial topic you will create the basic NeXTensio form that works with the NeXTensio list created earlier to allow adding, editing or removing articles.

The form will act on the article_art table, and aside the fields the user must enter, it will automatically fill in some values:

 

To create the form, follow the next steps:

  1. Open the admin/form page in Dreamweaver.

  2. Go to the MX Kollection tab of the Insert bar and click the Create NeXTensio Form Wizard icon. The wizard is divided in four (4) steps.

  3. In the first step define the table to insert/edit values into. Thanks to the user interface persistence, these fields should be already filled in. If you do not have the user interface persistence turned on, configure the fields as follows:


      

  4. In the second step configure the form fields. You can add and remove fields by selecting them in the grid and using the Plus (+) and Minus (-) buttons. Because of the user persistence you should have to add all fields except the assigned_to_art and status_to_art.


                                

  5. In the third step define validation rules for the fields. Since the only ones that are available to the user are the topic, title and content, make them required. Select each of them in the grid and check the Required option below:


                     

  6. In the last step set form specific options. Just select No for all the options in this step:


                      

  7. When you are done with all wizard options, click Finish to close the wizard and apply the changes.

The wizard will add HTML code for the form, as well as insert, update and delete transactions. From the HTML form you need to remove the fields that were marked to be displayed as text. Remove the entire row for the Created on, Edited on, Created by, Modified by, assigned to and status fields. Removing these fields from the form will not remove them from the transaction.

After removing these fields, the form will look like the following one in Dreamweaver:

 

You can access the form from the list - by logging in with an author account and clicking on the add new button, or by entering its URL directly in the browser address bar. Either way, when viewed in the browser it should look like:

 

When adding or editing content, authors and editors are, at least for now, provided with a very rudimentary tool - a simple textarea. If rich content is to be added, either everybody will be forced to learn HTML, or you will use an online visual HTML editor. In the next topic you will enhance the form by replacing the textarea with the KTML 4 control.