# | Form Item Handlers | Description |
---|
1 | cbxchange Syntax: Code Block |
---|
| this.fm.registerHandler("cbxchange", "<FORM_ITEM_ID>",
function(fm, event, fieldName, value) |
{
{
//Developer to perform operations here.
}); |
| This event handler is executed every time its associated field value gets changed. |
2 | cbxclick Syntax: Code Block |
---|
| 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. |
3 | cbxafterselect Syntax: Code Block |
---|
| 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. The component sends the selected record JSON object for the app layer to extract the data needed for populating the related fields. |
4 | cbxbeforeload Syntax: Code Block |
---|
| 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. |
5 | cbxclearlookup Syntax: Code Block |
---|
| 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. |
6 | cbxdateclear Syntax: Code Block |
---|
| 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. |
7 | cbxvalidate Syntax: Code Block |
---|
| 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. |
8 | cbxbeforetabchange Syntax: Code Block |
---|
| 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. |
9 | valuechange Syntax: Code Block |
---|
| this.fm.registerHandler("valuechange", "FORM_ITEM_ID",
function(fm, event, fieldName, value) |
{
{
fm.model.setValue('FORM_ITEM_ID', value.toUpperCase()); |
| This event handler is fired to capture and raise the event when the user is changing/entering the value in the field. The code provided on the left column is for a scenario when the developers want to change the text case as it is being typed from lowercase to uppercase. |