I am trying to customize bootboxjs.prompt options, but it seems that it doesn't allow an options object as a parameter
This is the example from http://bootboxjs.com/index.html#api
bootbox.prompt("What is your name?", function(result) {
if (result === null) {
Example.show("Prompt dismissed");
} else {
Example.show("Hi <b>"+result+"</b>");
}
});
This is what I am trying to pass:
var promptOptions = {
title: "Custom label",
buttons: {
confirm: {
label: "Save"
}
}
};
bootbox.prompt(promptOptions, function(result) {
if (result === null) {
console.log("Prompt dismissed");
} else {
console.log("Hi "+result);
}
});
How can I customize the title and buttons label ?