For Ajax FormData add extra parameters to pass data in PHP file,
See below example for that,
var fd = new FormData(document.getElementById("form"));
fd.append("CustomField", "This is some extra data");
$.ajax({
url: "stash.php",
type: "POST",
data: fd,
processData: false, // tell jQuery not to process the data
contentType: false // tell jQuery not to set contentType
});
Enjoy!
No comments:
Post a Comment