问题描述
我在formvalidation.io上遵循了this示例,并修改了多个文件上传的动态字段(基本上将输入类型更改为文件),并且对验证空字段没有问题,我也想使用{{ 3}}提交表单,我的问题是:
.on('core.form.valid',function() {
// Send the form data to back-end
// You need to grab the form data and create an Ajax request to send them
FormValidation.utils.fetch('/upload.PHP',{
method: 'POST',params: {
comic_name: $('#comic_name').val(),?? // i want the dynamic fields added in here.
},}).then(function(response) {
// Depending on the response from server,you can display a notification
// to let user kNow if the form is sent successfully
...
});
});
如果它是动态字段,应该在 params 部分中添加什么?因为该示例仅为单个字段提供了参数。以下是我的动态字段:
<input type="file" name="comic_series[]">
我是formvalidation.io的新手,对它不太熟悉,谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)