从GitHub页面提交formspree.io时出错 [英] Error when submitting formspree.io from GitHub pages
问题描述
我在GitHub页面上托管一个网站,当我尝试提交formspree.io表单时,出现以下错误:
这是我的代码:
< form action =http://formspree.io/example@example.commethod =post>
< div class =row uniform collapse-at-2>
< div class =6u>
< input type =textname =_ replytoplaceholder =Email>
< / div>
< / div>
< div class =12u>
< / div>
< br>
< div style =display:none>
< input type =hiddenname =_ subjectvalue =New submission!>
< input type =hiddenname =_ nextvalue =thanks.html>
< input type =textname =_ gotcha>
< / div>
< div class =row uniform>
< div class =12u>
< ul class =actions>
< li>
< input type =submitclass =specialvalue =Send>
< / li>
< / ul>
< / div>
< / div>
< / form>
这是由于代码错误,GitHub页面错误还是formpree错误?
您应该做的工作如下:
- 根据 formspree 举例:
< form method =POSTaction =http://formspree.io/YOUREMAILHERE> ; < input type =emailname =emailplaceholder =您的电子邮件> <峰; br> < textarea name =messageplaceholder =Your message>< / textarea> < button type =submit>发送< / div>< / form>< / code>< / div>
这里您的电子邮件地址放在 http://formspree.io/YOUREMAILHERE 之后。如果你想改变 name =email
到 name =_ replyto
(可帮助阅读邮件)
- 如果这也不起作用,并且显示您必须使用服务器。Formspree
然后在< head>
tag put:
< meta name =referrercontent =origin>
希望它有效!!
所有最好的:)
I am hosting a website on GitHub pages, and when I try to submit a formspree.io form I get the following 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>
Would this be due to a code error, GitHub pages error, or a formspree error?
解决方案 Things you should do to make it work are as follows:
- According to formspree example:
<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>
Here put your email in "http://formspree.io/YOUREMAILHERE" after /. And if you want change name="email"
to name="_replyto"
this will change the senders email to a clickable link.(Helps while reading in mail)
- If that also doesn't work and it shows that "you must use server. Formspree will not work in pages browsed as HTML pages."
Then inside your <head>
tag put:
<meta name="referrer" content="origin">
Hope it works!!
All the best :)
这篇关于从GitHub页面提交formspree.io时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!