Error submitting formspree.io from github pages

I host the site on GitHub pages, and when I try to submit the formpree.io form, I get the following error:

error

Here is my code:

<form action="http://formspree.io/ example@example.com " method="post"> <div class="row uniform collapse-at-2"> <div class="6u"> <input type="text" name="_replyto" placeholder="Email"> </div> </div> <div class="12u"> <textarea name="Message" placeholder="Message..." rows="4" cols="50" maxlength="500"></textarea> </div> <br> <div style="display:none"> <input type="hidden" name="_subject" value="New submission!"> <input type="hidden" name="_next" value="thanks.html"> <input type="text" name="_gotcha"> </div> <div class="row uniform"> <div class="12u"> <ul class="actions"> <li> <input type="submit" class="special" value="Send"> </li> </ul> </div> </div> </form> 

Is this due to a code error, a GitHub page error, or a formpree error?

+5
source share
2 answers

The things you need to do for them to work are as follows:

 <form method="POST" action="http://formspree.io/YOUREMAILHERE"> <input type="email" name="email" placeholder="Your email"> <br> <textarea name="message" placeholder="Your message"></textarea> <button type="submit">Send</button> </form> 

Paste your email address into http://formspree.io/YOUREMAILHERE "after /. And if you want to change name="email" to name="_replyto" , this will change the senders email to a name="_replyto" link. (It helps with reading by mail)

  • If this also does not work, and it shows that "you must use the server. Formspree will not work on pages viewed as HTML pages."

Then inside your <head> put:

<meta name="referrer" content="origin">

Hope it works!

All the best :)

+5
source

I had the same problem - add the following to the field:

 <meta name="referrer" content="origin" /> 

It worked from me.

+2
source

Source: https://habr.com/ru/post/1242416/


All Articles