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 |
---|---|---|
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.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);
});