POST form data via AJAX
-
Hey, in addition to sending my form data via e-mail, I want to retrieve the form data, convert it to JSON and send it to my REST API.
I’m aware that I have to add the custom JavaScript code in the additional functions section and use an event listener like this:
document.addEventListener( ‘wpcf7sent’, function( event ) {
//xhr
}, false );But now, how do I access the form fields? And bundle it all up in one JSON file?
Any help is greatly appreciated.
The topic ‘POST form data via AJAX’ is closed to new replies.