Front.confirm(options, callback)
Display a modal dialog with an optional message and two buttons, OK and Cancel.
The callback will receive a confirmed
boolean, indicating whether the user clicked OK or Cancel.
options: object
Field Name | Type | Description |
---|---|---|
title | String | Title of the alert. |
message | String | Body of the alert. |
okTitle (optional) | String | Label of the OK button. |
cancelTitle (optional) | String | Label of the cancel button |
callback: function
A callback function.
Front.confirm({
title: 'Title of the confirm dialog',
message: 'Body of the dialog.',
okTitle: 'Label of the OK button (optional)',
cancelTitle: 'Label of the cancel button (optional)'
}, function (confirmed) {
console.log('User confirmed?', confirmed);
});