Mautic Community Forums

onResponse and onResponseStart not working

I want to make a ajax call after submitting the form. i am using javascript for this



if (typeof MauticFormCallback == ‘undefined’) {

var MauticFormCallback = {};

}

MauticFormCallback = {

onValidateEnd: function (formValid) {

alert(‘onValidateEnd’);

console.log(“onValidateEnd”);

},

onResponse: function (data) {

alert(‘onResponse’);

return false;

},

onResponseStart: function (response) {

// called to process the response to the form submission

alert(‘onResponseStart’);

}

};

onValidateEnd is working but onResponse and onResponseStart not working can anyone please let me know why this is not working.

I want to make a ajax call after submitting the form. i am using javascript for this

if (typeof MauticFormCallback == ‘undefined’) {
var MauticFormCallback = {};
}
MauticFormCallback[‘signup’] = {
onValidateEnd: function (formValid) {
alert(‘onValidateEnd’);
console.log(“onValidateEnd”);
},
onResponse: function (data) {
alert(‘onResponse’);
return false;
},
onResponseStart: function (response) {
// called to process the response to the form submission
alert(‘onResponseStart’);
}
};
onValidateEnd is working but onResponse and onResponseStart not working can anyone please let me know why this is not working.