JavaScript API Reference/Ab.form.Form object

save()

Save form field values to the database. If the form's newRecord attribute has been set to true , a new record will be saved. If the form displays an existing record and the user does not change one of its primary key values, the existing record will be updated. However, if the user has changed one or more primary key values to an existing record, a new record will be created.

If the form panel contains a custom beforeSave event handler, the save() function will call it. If the beforeSave event handler returns false (usually because it has determined that a form field is invalid), the save operation stops.

Parameters: none

Example:

Save an edit form:

this.employeeForm.save();