我正在为静态网站制作联系表,网址为www.peek.solutions http://www.peek.solutions。联系表格有效,因为我(在确认我的电子邮件地址后)能够在给定地址接收电子邮件。这是使用的代码:
<form id="contactform" action="//formspree.io/[email protected] /cdn-cgi/l/email-protection" method="POST">
<div class="col-sm-7 slideanim">
<div class="row">
<div class="col-sm-6 form-group">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
</div>
<div class="col-sm-6 form-group">
<input class="form-control" id="email" name="_replyto" placeholder="Email" type="email" required>
</div>
</div>
<textarea class="form-control" id="comments" name="message" placeholder="Message" rows="5"></textarea><br>
<div class="row">
<div class="col-sm-12 form-group">
<button class="btn btn-default pull-right" type="submit">Send</button>
</div>
</div>
</div>
<input type="hidden" name="_next" value="//peek.solutions/confirmation.html" />
<input type="text" name="_gotcha" style="display:none" />
</form>
问题是,当我按“提交”按钮提交表单时,我被重定向到 Formspree 的默认确认页面:
然而,通过线路
<input type="hidden" name="_next" value="//peek.solutions/confirmation.html" />
我试图将此确认页面默认为 www.peek.solutions/confirmation.html。据我所知,这一行遵循文档https://formspree.io/ https://formspree.io/。谁能告诉我为什么这不起作用?
更新您的 URL 以包含http:
将解决该问题。所以对于_next
其应有的价值http://peek.solutions/confirmation.html
,
为了防止泄露您的电子邮件,并使用现在在表单中使用电子邮件的传统方法,您可以注册免费 Formspree 帐户 https://formspree.io/register并生成自定义端点。更多信息关于旧表格可以在这里找到 https://help.formspree.io/hc/en-us/articles/360056076314-Phasing-out-legacy-forms-email-URLs.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)