I am hoping to add a contact form to a GitHub Jekyll website. I have mostly been following advice from the most-liked answer here, from a YouTube tutorial here, and from the FormSpree site.
I created a FormSpree account, verified my e-mail address, and created a form (obtained an ID). Then, I tried to add a contact form into my GitHub Jekyll website, the code of which can be seen here. After that, I went to the corresponding site of that code (here) and sent a test form submission. In the e-mail address field, I tried both the e-mail address connected to FormSpree and an alternative email address.
Either way, upon submitting the "Send" button at the bottom of the page, the page refreshed with an error message: "Form should POST - Make sure your form has the method=POST
attribute". I also did not receive the tested message in my email connected to FormSpree. I tried to research this error but see no solutions. As can be seen in the code (here), I believe I do set a method=POST
attribute.
I am unsure how to proceed given my inability to effectively interpret the error message. Any advice on how to render this type of contact form successful, especially given this error message, would be very much appreciated!
There is an error in your HTML:
<form action="https://formspree.io/[email protected] method="POST" name="sentMessage" id="contactForm" novalidate>
Your action is missing a closing double-quote ("
) which leads to a false interpretation of your action
attribute as "https://formspree.io/[email protected] method="
and your actual method as an invalid attribute post"
.
Should be fixed by replacing the above line with
<form action="https://formspree.io/[email protected]" method="POST" name="sentMessage" id="contactForm" novalidate>
Doing so in your pages source code, I was able to submit the form and landed on FormSpree landing page indicating, that your form needs to be activated.