Live Form - Events & Methods
Events
Live Form behavior can be customized with the help of the call-back events. These events can be accessed from the events tab on the Properties panel. The trigger for the event can be JavaScript, another Variable call, and more.
On before service call
This event will be called on saving the live form. Any validation checks can be performed here. Returning false from the script will stop the live form save.
Example
On result
This event will be called after the live form is saved and API returns a response. The event is triggered in both success and failure cases.
Example
On success
This event will be called after the live form is saved and API returns a success response.
Example
On error
This event will be called after the live form is saved and API returns a failure response.
Example
Methods
Live Form has few methods exposed on widget scope to Edit, Delete, Add record and trigger actions like reset and cancel.
For the following script samples, we are considering the hrdb
Employee
table. `EmployeeForm is bound to the SelectedItem
of a Data Grid corresponding to Employee
Live Variable.