Multiple Summernote text comments on one page
whenever i submit a form with multiple summernote textarea their value is empty while resetting their values.
View (html)
<form action="some/url" method="post">
<textarea name="agenda" class="editor"></textarea>
....
<textarea name="details" class="editor"></textarea>
</form>
Js
$('.editor').summernote();
Backend
dd($request->all());
Output
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 ▶}
]
Serialized form output
$('#createAnnForm').submit(function(e){
e.preventDefault();
console.log($(this).serialize());
});
Console log output
type=7&company=1&event_date=2015-10-08&pub_date=2015-07-08&fiscal_year%5B%5D=2&agenda=&title=Title&details=
and this error
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
any help would be appreciated. thank you in advance
+3
source to share
No one has answered this question yet
Check out similar questions: