Rules¶
Widget behavior in Emakin forms is governed by rules, which define when widgets are visible, read-only, or required. These rules ensure dynamic and context-sensitive form interactions.
Each rule defines a single condition that, when met related action is taken. Any number of rule conditions can be defined for a widget. When multiple condition are defined, rules are executed sequentially in the order they are defined.
Types of Rules¶
Formatting Rule¶
Modifies a widget's appearance based on the value of a data model property. Customizations include:
- Changing colors, fonts, and visibility.
- Applying styles such as bold or italic text.
Example: Changing the background color of a text box when a specific condition is met.
Validation Rule¶
Ensures the accuracy and consistency of form input by validating widget values against specified conditions.
- Displays feedback when validation fails.
- Prevents data submission until conditions are satisfied.
Example: Requiring a mandatory field to be filled before proceeding.