MForm modes - Demonstration

In the following demonstration, the Person control is set to View mode. Hence, only the content of the Reference control can be modified.

 
Team
Reference
Main Person
Person
key1
First NameEdgar
SurnamePolgar
Person
key2
First NameFrancis
SurnameDrake
Person
key3
First NameMarty
SurnameKalish
Person
key4
First NameDebra
SurnameGlatz
Person
key5
First NameJeff
SurnameLazarus
XML output

        
MForm modes - Description

The MForm controls may be displayed in 2 modes:

  • Edit mode - the default mode, lets the user modify the content
  • View mode - lets the user only watch the contents

In the View mode, the add and remove buttons are not rendered, and the leafs are always displayed as spans

The mode can be set on any level of the MForm controls tree.

The mode of each control is calculated in this way:

  • If the control has the mode set, this mode is used
  • If any of the controls precedessors has the mode set, the nearest precedessor's mode is used
  • Otherwise the Edit mode is used