@ -297,9 +297,19 @@ The resulting modal will be like that:
#### Saving the Modal
When you click to the `Save` button, the form is posted to the server. If server returns a success response, the modal is closed. Otherwise, it shows the error message returned from the server.
When you click to the `Save` button, the form is posted to the server. If the server returns a **success response**, then the `onResult` event is triggered with some arguments including the server response and the modal is automatically closed.
> You can register to the events to be informed when form is saved or modal is closed. See the *Modal Manager Reference* section below.
An example callback that logs the arguments passed to the `onResult` method:
````js
productCreateModal.onResult(function(){
console.log(arguments);
});
````
If the server returns a failed response, it shows the error message returned from the server and keeps the modal open.
> See the *Modal Manager Reference* section below for other modal events.
#### Canceling the Modal
@ -307,6 +317,14 @@ If you click to the Cancel button with some changes made but not saved, you get