Solution:1
Your Ajax Request should be like this
$.ajax({
type: "POST",
url: "/wp-admin/admin-ajax.php",
data: data,
dataType: "JSON",
contentType: false, //Required
cache: false, //Required
processData: false, //Required
beforeSend: function () {
//Your functions before send AJAX Request
},
success: function (feedback) {
//Your functions after AJAX Request Success
},
error: function (error) {
console.log(error);
},
});
And You can get all the form data using
var data = new FormData(document.getElementById("yourFromId"));