[英]Trying submit a form with parsley js and blade
I'm using parsley js with blade to validate the form but I can not submit. 我正在使用带有叶片的欧芹js来验证表单,但无法提交。 Inputs are being validated normally but nothing happens.
输入已被正常验证,但没有任何反应。 My code looks like this:
我的代码如下所示:
{{ Form::open(['method' => 'PUT', 'id' => 'form-cronoanalise-edit', 'data-parsley-validate']) }}
<input type="hidden" name="pro-id" id="hidden-id">
<div id="show-maquina">
<div class="form-group">
<label>Referência da Máquina</label>
<select class="form-control" name="ref-maquina" id="ref-maquina"></select>
</div>
<div class="form-group">
<label>Tempo</label>
<input class="form-control" type="text" name="tempo-maquina" id="tempo-maquina" data-parsley-required="true">
</div>
</div>
<div id="show-funcionario">
<div class="form-group">
<label>Setor</label>
<select class="form-control" name="setor" id="setor-edit"></select>
</div>
<div class="form-group">
<label>Funcionário</label>
<select class="form-control" name="funcionario" id="funcionario-edit"></select>
</div>
<div class="form-group">
<label>Tempo</label>
<input class="form-control" type="text" name="tempo-funcionario" id="tempo-funcionario" data-parsley-required="true" data-parsley-type="number">
</div>
</div>
<div class="btn-group">
{{ Form::submit('Alterar', ['class' => 'btn btn-warning', 'id' => 'btn-submeter']) }}
<a href="javascript;;" class="btn btn-default" data-dismiss="modal">Cancelar</a>
</div>
{{ Form::close() }}
This form is displayed within a modal bootstrap. 此表格显示在模式引导程序中。 Can anyone help?
有人可以帮忙吗?
As usual, without a working example, it's very hard to tell exactly what's going on. 像往常一样,没有可行的示例,很难准确说明正在发生的事情。
I'd try removing the data-parsley-validate
and binding it yourself with Javascript once the modal is open. 模态打开后,我将尝试删除
data-parsley-validate
并将其自己与Javascript绑定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.