ebs.addFormChangeEvent

Adds an event that triggers if the value of an attribute has changed.

Syntax

Copy
function ebs.addFormChangeEvent(formId: string, attributeName: string, eventHandler: Function): void;
 
Parameter Type Description
formId string The ID of the HTML element storing the form.
attributeName string Name of the attribute you wish to monitor for changes.
eventHandler Function Function to be triggered if the value of the specified attribute changes.
Starting with release 24.2, this function accepts a single optional input parameter that conforms to the IChangeHandlerParam interface.
 
Copy
interface IChangeHandlerParam {
  value: any,
  previousValue: any,
}
 
This standardizes and simplifies the process of passing the attribute's current and previous values to the event handler function. Previously, the implementation varied depending on the type of control used to display the entity attribute.

Examples