Front.prompt(options, callback)
Display a dialog with an optional message prompting the user to input some text.
The callback will receive a val
with the text entered by the user (or null
if the user canceled).
options: object
Field Name | Type | Description |
---|---|---|
| String | Title of the alert. |
| String | Body of the alert. |
| String | Label of the OK button. |
| String | Label of the cancel button |
callback: function
A callback function.
Front.prompt({
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 (val) {
console.log('User entered:', val);
});