$(document).on('wpcf7mailsent', function() {
// Select the form with jQuery and serialize the input fiels
let formData = $('.wpcf7-form').serialize()
// Get a Form Post URL from Act-On dashboard
let actonUrl = 'ACTON_POST_FORM_URL_GOES_HERE'
// Submit the request with Ajax.
$.ajax({
url: actonUrl,
type: 'POST',
data: formData
})
.done(function() {
console.log('submitted to acton');
})
.fail(function() {
console.error('could not submit to acton');
})
});