If the dynamic part of the form contains ckeditor it wont save correctly.
Here is a fix for ModalRemote.js
`
/**
Prepare submit button when modal has form
@param {string} modalForm
@param {object} modalFormSubmitBtn
*/
this.setupFormSubmit = function (modalForm, modalFormSubmitBtn) {
if (modalFormSubmitBtn === undefined) {
// If submit button not found throw warning message
console.warn('Modal has form but does not have a submit button');
} else {
var instance = this;
// Submit form when user clicks submit button
$(modalFormSubmitBtn).click(function (e) {
var data;
console.log('KAKI:', CKEDITOR.instances);
// Update all instance of CKEDITOR for ajax submit.
for (var i in CKEDITOR.instances) {
CKEDITOR.instances[i].updateElement()
}
// Test if browser supports FormData which handles uploads
if (window.FormData) {
//console.log($(modalForm));
data = new FormData($(modalForm)[0]);
} else {
// Fallback to serialize
data = $(modalForm).serializeArray();
}
// Send the form to server by ajax:
instance.doRemote(
$(modalForm).attr('action'),
$(modalForm).hasAttr('method') ? $(modalForm).attr('method') : 'GET',
data
);
});
}
If the dynamic part of the form contains ckeditor it wont save correctly.
Here is a fix for ModalRemote.js ` /**
@param {object} modalFormSubmitBtn */ this.setupFormSubmit = function (modalForm, modalFormSubmitBtn) {
}; `