Custom button in prompt #562

sachadee opened this Issue Nov 29, 2016 · 1 comment


None yet

2 participants


Hi is there a way to have 2 confirm button in a prompt box.

example : I have a prompt box to get a value and the 3 possible choice are [2 hours] [5 Hours] [Cancel]

so at the end I'll have the value and the hours.

Another solution will be a Radio Button but Ifound nothing in the doc.

Thanks for this great tool !

tiesont commented Nov 29, 2016

No, unfortunately, that's not how prompt works. You can customize the style and the text shown in the cancel and submit buttons, but you cannot add another button. There also currently isn't an option for radiobuttons as an input type, although there is a Stack Overflow answer that made a quick and dirty change to the code that would more or less provide that:

You can also just use the bootbox.dialog() function, although that requires you to do all the configuration and button processing yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment