Close Modal
The Close Modal function is used to programmatically close the currently active modal dialog.This function helps complete modal-based workflows by returning the user to the underlying screen after an action is completed.
Commonly used for :
- Closing modal after successful submission
- Cancelling modal-based operations
- Returning to previous screen context
- Finalizing modal workflows
- Exiting temporary overlay interactions
Sample Code :
REQUEST DETAILS
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.closeModal();
});
};
When this method is called, the active modal is closed and the user is returned to the previous context.