Skip to main content

Confirm Modal

The Confirm Modal function is used to display a confirmation dialog that asks users to approve or cancel an action.This helps ensure that users intentionally perform sensitive or irreversible operations.

Commonly used for :
  • Confirming delete operations
  • Validating user intent before updates
  • Displaying warning confirmations
  • Preventing accidental actions
  • Requesting approval for sensitive tasks
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
   ZFAPPS.confirm({
    title: 'Confirm Action',
    message: 'Are you sure you want to continue?'
  }).then(function (response) {
    if (response?.ok) {
     // User confirmed the action
    }
  });
});
};

The confirmation dialog returns a boolean value based on the user’s selection.