Canvas provides the following event handlers to manage the Form Item actions.
# |
Form Item Handlers |
Description |
---|---|---|
this.fm.registerHandler("cbxchange", "<FORM_ITEM_ID>", function(fm, event,fieldName, value) |
This event handler is executed every time its associated field value gets changed. |
|
this.fm.registerHandler("cbxclick", "<FORM_BUTTON/HYPERLINK_ID>", function(fm, event,fieldName) {//Developer to perform operations here. |
This event is raised on click event of the button or hyperlink item. |
|
this.fm.registerHandler("cbxafterselect", "<LOOKUP_ID>", function(fm, event,fieldName, value) {//Developer to perform operations here. |
This event is raised for the Lookup items when the user selects a record within the data list presented in the pop-up. |
|
this.fm.registerHandler("cbxbeforeload", "<LOOKUP_ID>", function(fm,event, fieldName) {//Developer to perform operations here. return params |
This event is raised by the lookup before it creates its data load request. The app layer is expected to return a param JSON that is attached to override the existing base params of the lookup. |
|
this.fm.registerHandler("cbxclearlookup", "<LOOKUP_ID>", function(fm, event,fieldName, value) {//Developer to perform operations here. |
This event is fired when the lookup item is cleared. |
|
this.fm.registerHandler("cbxdateclear", "<FORM_DATEFIELD_ID>", function(fm, event,fieldName, value) {//Developer to perform operations here. |
This event is fired when the date field of a form is cleared. |
|
this.fm.registerHandler("cbxvalidate", "<FORM_ITEM_ID>", function(fm, event, fieldName, value) { //Developer to perform operations here. |
This event handler is fired every time its associated field value changes before its value is set to the model for update. The handler is expected to invalidate the field if necessary and return true or false. In case of false, the model data is not updated with the same value. |
|
this.fm.registerHandler("cbxbeforetabchange", "<FORM_ITEM_ID>", function(fm, event, fieldName, value) { //Developer to perform operations here. |
This event is fired by the Tab Panel when the user tries to switch between two tabs. The handler is expected to return Boolean value to allow or stop the switch. |
|
this.fm.registerHandler("valuechange", "FORM_ITEM_ID", function(fm, event, fieldName, value) |
This event handler is fired to capture and raise the event when the user is changing/entering the value in the field. |