Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 使用Laravel 4+验证后,保持模态并显示错误;3引导_Twitter Bootstrap_Laravel_Modal Dialog_Validation - Fatal编程技术网

Twitter bootstrap 使用Laravel 4+验证后,保持模态并显示错误;3引导

Twitter bootstrap 使用Laravel 4+验证后,保持模态并显示错误;3引导,twitter-bootstrap,laravel,modal-dialog,validation,Twitter Bootstrap,Laravel,Modal Dialog,Validation,阅读文章: 启用在验证后立即打开模式框,但是,显示没有发生错误,只显示表单,我相信这是因为操作再次调用jquery表单,因为我使用的是远程函数bootstrap 3 model 提示解决并请在模式窗口中显示错误 控制器: if ($validacao->fails()) : $input = Input::all(); $input['autoOpenModal'] = true; return Redirect::back()->withErrors($valid

阅读文章: 启用在验证后立即打开模式框,但是,显示没有发生错误,只显示表单,我相信这是因为操作再次调用jquery表单,因为我使用的是远程函数bootstrap 3 model

提示解决并请在模式窗口中显示错误

控制器:

if ($validacao->fails()) :
   $input = Input::all();
   $input['autoOpenModal'] = true;
   return Redirect::back()->withErrors($validacao)->withInput($input);
endif;
模态形式:

<div>
   {{ Form::label( 'inputEmail1', 'Email', array( 'class' => 'col-lg-2 control-label' ) ) }}
   <div>
      {{ Form::email( 'email', '', array( 'class' => 'form-control', 'placeholder' => 'Email' ) ) }}
      {{ $errors->first('email', '<p class="help-block text-danger">:message</p>') }}
   </div>
</div>

{{Form::label('inputEmail1','Email',数组('class'=>'col-lg-2控件标签'))}
{{Form::email('email','',数组('class'=>'Form control','placeholder'=>'email'))}
{{$errors->first('email','help block text danger'>:message

')}
Jquery操作:

<script type="text/javascript">
   if ({{ Input::old('autoOpenModal', 'false') }}) {
      $('#remoteModal').modal({show: true, remote: '{{ URL::to('users/inserir') }}'});
   }
</script>

if({Input::old('autoOpenModal','false')}){
$('#remoteModal').modal({show:true,remote:'{{{URL::to('users/inserir')}});
}
我认为这个遥控器像一个新调用一样加载引导模式,因此他的
$errors->first()
没有显示任何内容


已经感谢您的帮助

您不需要在此处进行任何远程获取。表单已存在于页面上的模式中

正如你的帖子所说:

    if ({{ Input::old('autoOpenModal', 'false') }}) {
        //JavaScript code that open up your modal.
        $('#remoteModal').modal('show');
    }