Try using .serialize()
instead of FormData
function step1SaveData(){
var formData = jQuery('#tpform1').serialize();
console.log(formData);
jQuery.ajax({
type:"POST",
url:'http://lexem.in/wp-admin/admin-ajax.php',
data:{
action:'tpartners',
formdata:formData,
},
success:function(data){
var insertedID = data.trim();
if(insertedID!='fail'){
}else{
console.log('fail');
}
}
});
}
or use .serializeArray()
if you want your data in an array instead of a string.
EDIT – from the comments, remove processData:false
and contentType:false
from the ajax call