contact-form
contact-form copied to clipboard
Decoupled Front-End Not Working
Description
I have a decoupled front-end built using Gatsby and would like to use this plug-in as a simple way to handle the contact form. As of now I have spent hours trying to debug this and cant seem to get anywhere. When I post the form submission from the front-end I get a 200 response back but no email is sent and nothing shows up in logs for craft side. The 200 response is shown in what I console.log in my fetch response but the "network" tab of the inspector response tab shows a preview of the homepage. I don't think that it is a CSRF issue because that usually will throw a 400 bad request error. Is there something Im missing here?
I am also using Mailgun SMTP and have successfully sent a test email from the CP.
Example POST payload:
action=contact-form%2Fsend&message%5BfromName%5D=Max&message%5BcompanyName%5D=max%40thesmithy.io&fromEmail=test%40test.com&message%5BphoneNumber%5D=1231231234&message%5Bbody%5D=test
Steps to reproduce
- Submit form over AJAX using
fetch
- Observe 200 response
Additional info
- Craft version: 3.8.1
- PHP version: 7.4
- Database driver & version: MySQL 8.0
- Plugins & versions: contact-form 2.5.2