【问题标题】:Empty submitted Formspree form清空提交的 Formspree 表单
【发布时间】:2017-07-03 10:41:25
【问题描述】:

我有一个关于 Formspree 的问题。一切正常,我可以提交表单,每次提交表单时我的邮箱都会收到一封电子邮件,但是在我收到的电子邮件中没有任何内容,没有内容,没有消息,没有姓名,没有电子邮件人的邮件。

看起来像这样:

你好, 有人刚刚提交了您的表单......这是他们不得不说的:

此表单于 2017 年 7 月 2 日 UTC 下午 12:31 提交。

也许有人知道为什么它不能正常工作? HTML 代码如下所示(除了电子邮件):

<form method="POST" action="http://formspree.io/e-mail">
    <div id="formular" class="col-lg-6">
        <input type="text" placeholder="Your name">
        <br>
        <input type="email" placeholder="Your mail">
        <br>
        <textarea placeholder="Your message"></textarea>
    </div>                  
    <div id="send" class="col-lg-12">
        <input type="submit" class="btn btn-default btn-color hvr-wobble-vertical" value="Send message">
    </div>
</form>

【问题讨论】:

  • 您的所有表单字段都缺少name 属性。没有名称意味着提交表单时不会发送任何值。

标签: html forms email


【解决方案1】:

您的input field 中缺少name 属性

像这样更改您的输入字段

 <input type="text" placeholder="Your name" name="name">
 <input type="email" placeholder="Your mail" name="_replyto">

【讨论】:

  • 这正是问题所在。忘记将它添加到我们使用 Formspree 的网站上的一个字段中,这修复了它。我为 idname 属性使用了相同的名称。
猜你喜欢
  • 2017-07-31
  • 2018-09-17
  • 2019-02-28
  • 1970-01-01
  • 2018-10-26
  • 1970-01-01
  • 1970-01-01
  • 2021-04-17
  • 1970-01-01
相关资源
最近更新 更多