confirmDialog (deprecated)
confirmDialog()
is considered deprecated
Support for the confirmDialog()
dialogs may be dropped in future versions of the JourneyApps Runtime. Please upgrade your app to use journey.dialog.confirm
to ensure that your app remains compatible with the JourneyApps Runtime.
These docs describe dialogs called from JavaScript/TypeScript. For more fully featured, dynamic dialogs, please refer to the dialog
UI component docs. These dialogs are specified from the view XML and can include nested components.
To display a confirmation dialog to the user, use the confirmDialog()
built-in JourneyApps function in your JavaScript/TypeScript.
Simple Confirm Dialog
The simplest case of using confirmDialog()
is simply to provide the message shown in the dialog, and the return value of confirmDialog()
indicates whether the user pressed "OK" or "Cancel"
Confirm Dialog with a Title
To display a dialog with a title and message, provide two arguments to confirmDialog()
. The first parameter is the title, the second is the message. The return value of confirmDialog()
indicates whether the user pressed "OK" or "Cancel"
Customizing the Button Text
The default "OK" and "Cancel" buttons can be customized by providing two additional arguments to confirmDialog()
Customizing the button color
Version compatibility
The ability to customize a confirmDialog
's button color was introduced in version 4.50 of the JourneyApps Container.
To customize the button color, specify an object with text
and color
as fields instead of a string with the button's text.
Last updated