The dialog is async, you can prevent the default action right away, and then call the submit if the user accepts. Here is an example: http://jsfiddle.net/ty5Wc/3/
$('#delete').on('click', function (e) {
e.preventDefault();
bootbox.confirm("Are you sure?", function (response) {
if(response) {
$('#form').submit();
}
});
});
$('#form').submit(function () {
//do your validation or whatever you need to do before submit
});
Edit: After talking more with OP, he also wanted to pass button value in the query string, my solution for that is here: http://jsfiddle.net/ty5Wc/5/
$('#delete').on('click', function (e, confirmed) {
if (!confirmed) {
e.preventDefault();
bootbox.confirm("Are you sure?", function (response) {
if (response) {
$('#delete').trigger('click', true);
}
});
}
});
$('#form').submit(function (e) {
//do your validation or whatever you need to do before submit
});