Form Change Handler
The form component offers a special event: form change. This event is triggered when a form value is updated or when the user starts editing a data record on the form (at this point all form items will change). The event handler method receives in a parameter an instance of the changed form component and an instance of the changed form item (if the record editing has just started, this parameter is null) and the updated data record.
In the event handler, you can process the changed data and perform operations with them. Such an operation can be checking new values or recalculating a field.
Setting a form change handler to the form:
Using a form change handler to recalculate a field. If col1's value is not between 1 and 100, an exception is thrown:
Using a form change handler to recalculate a field's value. col2 should equal the double of col1: