(07-19-2017, 01:49 AM)Martin7483 Wrote: Remove the enctype="multipart/form-data" attribute from the opening form tag
That attribute is only needed when uploading files.
I missed this up untill now, but that indeed could be the cause.
If you do require uploading files in the future, you will need to do this;
Code:
function save(form) {
// NO!!! Don't do this!
var formData = $(form).serialize();
// YES!!! Do this!
var formData = new FormData(form);
$.ajax({
url: url,
type: "POST",
data: formData,
dataType: "JSON",
......
......
}
Sir,
But for now, I just need input text and removing the
enctype="multipart/form-data" doesn't change anything. My idea of creating a one-page CRUD in codeigniter seems too hard for a beginner. If I can't correct the errors I may use the modal way but as this moment I will stick on one-page crud.
Thanks for the TIME.