Continuous Editable Forms

Continuous Editable Forms were introduced in Morfik 2.1 as a new View Mode which enables continuous Forms to be switched to edit mode, as the name suggests. When you set a form's View Mode property to vmContinuousEditable you just need to add a Navigator Bar to the form, with the data manipulation buttons present and it will take care of activating those functions on the form.

A detailed introduction to Morfik forms can be found here.

Creating a Continuous Editable Form

The simplest way to generate a continuous editable form is just to set the View Mode and drop TextLabels linked to data fields on to the Detail band. When either of the Add or Edit buttons on the Navigation bar is clicked, edit controls will automatically be generated for the read-only controls based upon the data field type.

In figure 1, the detail band indicated by the number 1 contains four TextLabels that are connected to two text fields, a date field and a text field with two text options. Figure 2 shows the same detail band at runtime after the add button has been clicked. The controls automatically generated next to the number 2 are two TextEdits, a DateEdit and another TextEdit.

Figure 1: A ContinuousEditable form at design time.

Figure 2: An automatically generated ContinuousEditable form at run time.

Designing the Edit Band

To be able to design the Editable band, right-click anywhere on the form and from the popup menu select Form -> Customize Edit Band, shown next to the number 3 in figure 3. This will open up the edit band with the automatically generated edit controls in place (see figure 4).

Figure 3: Activitating the Edit band at design time.

Figure 4: The Edit band at design time.

Figure 5 shows some manual changes to the edit band made at design time: the color of the TextEdit controls has been changed (see number 5) and the TextEdit box for Gender has been replaced with a ComboBox (number 6).

Note that if the edit band is hidden again during design time by deselecting Customize Edit Band any changes to the edit band will be removed. Also when the Edit band is displayed, the automatically generated controls can be restored by right-clicking on the form and selecting Form -> Synchronize Edit Controls from the popup menu.

Figure 5: Modified Edit band at design time.

Runtime Considerations

A user who is presented with a continuous editable form can use the Navigation bar to add, edit and delete records, however the changes made are only recorded locally. To update the database on the server, the user must click the Submit icon or navigate to a different page, at which time all changes will be posted to the server.

To view a sample of Continuous Editable Forms in action, click here

Related Topics

Back to top