1.I want form should gives bootbox confirm popup and after clicking on confirm button of bootbox should submit the form**[Important]**
2.Bootbox Popup is coming on clicking update button but it should not submit the form on clicking confirm button of bootbox.(in alert it gives true value on clicking confirm)
javascript:
$('.linkmasterdata').submit(function(e)
{
bootbox.confirm({
title: "Confirmation Message?",
message: "Do you want to update this form?.",
buttons: {
cancel: {
label: '<i class="fa fa-times"></i> Cancel'
},
confirm: {
label: '<i class="fa fa-check "></i> Confirm'
}
},
callback: function (result) {
console.log('This was logged in the callback: ' + result);
if (result == true) {
$("#submit").click();
}
}
});
e.preventDefault();
});
{!! Form::model($law, array('route'=>array('admin.forms.update',
$forms->id),'id'=>'linkmasterdata', 'class' => 'form-horizontal edit_form',
'method' => 'PUT', 'files' => true)) !!}
<input type="submit" id="submit" class="btn btn-success submit" value="Update">
{!! Form::close !!}