每当我提交带有多个summernote textarea的表单时,他们的值在转储其值时为空。
查看(html)
<form action="some/url" method="post">
<textarea name="agenda" class="editor"></textarea>
....
<textarea name="details" class="editor"></textarea>
</form>
JS
$('.editor').summernote();
后端
dd($request->all());
输出
array:17 [▼=
"type" => "7"
"company" => "1"
"event_date" => "2015-10-08"
"pub_date" => "2015-07-08"
"fiscal_year" => array:2 [▶]
"agenda" => ""
"title" => "Title"
"details" => ""
"image" => UploadedFile {#29 ▶}
]
序列化表格输出
$('#createAnnForm').submit(function(e){
e.preventDefault();
console.log($(this).serialize());
});
控制台日志输出
type=7&company=1&event_date=2015-10-08&pub_date=2015-07-08&fiscal_year%5B%5D=2&agenda=&title=Title&details=
和此错误
Uncaught TypeError: Cannot read property 'val' of undefined(anonymous function)
@ summernote.min.js:2m.event.dispatch
@ jquery.js:4m.event.add.r.handle
@ jquery.js:4
任何帮助都会很好。提前谢谢