I have a wordpress site with a form. I converted the WP site to static site, put it on GitHub, added the form code specified in the docs to index.html and tested.
When I test it the form doesn’t work:
(1) there is no “generically styled success message with a link back to the form page”
(2) the form submission is not visible on https://app.netlify.com/
That said, the form is visible on https://app.netlify.com/ - I see it’s name.
Also, while my test submissions failed, I can see a submission on the “Spam Submissions” list.
Any help would be appreciated!
Did you use the search before posting? >> YES, read this stuff…
instead of an actual button. To the best of my knowledge we need an actual submission to be able to pick up the form submit.
can you replace that with <button type="submit">Contact Tom</button>
Luke, thanks for the reply. I changed the code as you suggested but my form is still not working.
I do not get the “success message” when I click submit nor do I see my test messages in the “Verified submissions” list (though I continue to get new submissions in the “Spam submissions” list).
Any additional suggestions you could offer would be appreciated. Thanks again!
As far as I’m aware there is only one form in the deploy.
You state “in your last deploy, we got one with a definition that still had an action=POST”
I’m not sure why this would be. I deploy from GitHub and three days ago, per Luke’s suggestion, I pushed a change to GitHub that changed from action="POST" to method="POST". Below is a screenshot showing that change in GitHub and when I load thomasjcoffey.com I see method="POST" in the site code.
Regardless, I just tried adding action=/thank-you and deploying via GitHub.
I added it to the same line I’ve been editing. It now reads <form class="fl-contact-form" method="POST" action=/thank-you name="netlify_contact_form" data-netlify="true" Content-Type="application/x-www-form-urlencoded" >
Is that where I was supposed to place the action=/thank-you code? I still don’t get a success message and form submission data isn’t flowing to Netlify.
It doesn’t look like your action path exists. If you go here: https://thomasjcoffey.com/thank-you, you’ll get a 404. For that that work, you will need to make sure to include that page in your deploy.
Hi Thomas, it looks like you are trying to use a custom recpatcha. However, I don’t see that you have the environment variables set up for the recaptcha to work. Could you follow the steps mentioned in the link and then re-deploy your site? Let me know if that helps.