Solved
leadCapture/save in Ajax get FAIL status
Hi,
I need to send lead from sever to sever, here is the code when the form is submitted:
let data= {
'munchkinId': 'xxx-xxx-xxx',
'formid': xxx,
'Email': 'xxxx@xxx.com'
}
$.ajax({
type: 'POST',
url: '//xxx.oursite.com/index.php/leadCapture/save',
data: data,
success: function (data) {
console.log('run callback here');
},
error: function (xhr, error) {
console.log(xhr, error);
}
});
by doing this, I can send this lead to Marketo but I get failed status. since I need a callback when lead is sent, does anyone know how to fix this?
