bootbox确认未提交表单

时间:2017-11-10 07:11:37

标签: javascript jquery laravel-5.2 bootbox

1.我希望表格应该给bootbox确认弹出窗口,点击bootbox确认按钮后应该提交表格** [重要] **

2.Bootbox Popup正在点击更新按钮,但它不应该在单击bootbox的确认按钮时提交表单。(在警告中它点击确认时给出了真正的价值)

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 !!}

0 个答案:

没有答案