html - 从 GitHub 页面提交 formspree.io 时出错

标签 html forms github

我在 GitHub 页面上托管一个网站,当我尝试提交 formspree.io 表单时,出现以下错误:

error

这是我的代码:

<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>

这是否是由于代码错误、GitHub 页面错误或 formspree 错误造成的?

最佳答案

你应该做的事情如下:

<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>

这里将您的电子邮件放在“http://formspree.io/YOUREMAILHERE”中/之后。如果你想改变 name="email"name="_replyto"这会将发件人电子邮件更改为可点击的链接。(阅读邮件时有帮助)

  • 如果这也不起作用,它会显示“您必须使用服务器。Formspree 将无法在作为 HTML 页面浏览的页面中工作。”

然后在你的<head>里面标签放置:

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

希望它有用!!

祝一切顺利:)

关于html - 从 GitHub 页面提交 formspree.io 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35236643/

相关文章:

objective-c - 你会如何编写以 "Reactive Cocoa"方式获取集合?

git - 通过 SSH 将 VS Code 连接到 Github 会导致 SSH 错误

javascript - 如何使用jquery从html中提取元素?

html - 垂直和水平对齐嵌套CSS中的内容

html - 我如何从一个组件路由到 Angular 中另一个组件的一部分?

jQuery 在选择带有空/空值的选项中查找选项将其删除并选择其后带有值的第一个选项

javascript - 未捕获的 TypeError : form. 提交不是表单 validate() 函数中的函数

html - 如何在悬停时停止盒子的移动?

javascript - 如何在 Internet Explorer 中自动填写表单而无需输入?

git - 在 GitHub 中 merge 分支