ebs.saveEditForm
Saves a form displayed in a specific HTML element.
Syntax
Copy
function ebs.saveEditForm(htmlId: string, callback: Function): boolean;
| Parameter | Type | Description |
|---|---|---|
htmlId
|
string | ID of the form's HTML element. |
callback
|
Function | Callback function to run on the returned output. |
The output returned for the callback function includes information such as the ID of the saved record or if the save was successful, for example:
Copy
{
ClientScript: null,
ErrorCode: 0,
Id: "ff41b9bf-1506-42b4-a518-1121b9d0250a",
IsSuccess: true,
Message: "Record updated",
Serialized: "{\"Id\":\"ff41b9bf-1506-42b4-a518-1121b9d0250a\",\"Message\":\"Record updated\",\"IsSuccess...,
UIResult: null
}
Return Value
Returns True if the save was successful or False otherwise.
Examples
In this example:
- We create an event handler that triggers when clicking the saveForm custom button.
- We use the formData.name method to retrieve the current form's HTML element ID and save it.