I've tried searching but this only returns results on how to AJAX load a page/form. What I am doing is loading a form via AJAX (Contact Form 7) and I would like to know how to re-enable AJAX submission on that form. Is this a possibility with CF7?
Use the following code for version 5.4 or above:
document.querySelectorAll(".wpcf7 > form").forEach((
function(e){
return wpcf7.init(e)
}
)
);
Put this in your ajax response. This will re-initialize all forms
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With