我的表单验证有问题:当我们这样写电子邮件时 -foo@bar
不显示错误,但表单发送也失败。我该如何解决?
[[!FormIt?
&hooks=`spam,email,redirect,FormItAutoResponder`
&emailTpl=`emailTplContact`
&emailTo=`my@email.com`
&validate=`email:email:required,
name:required,
agree:required`
&redirectTo=`2532`
&fiarTpl=`emailAutoRespond`
&fiarSubject=`Success`
&fiarFromName=`English School`
&fiarFrom=`my@email.com`
&fiarToField=`email`
&fiarReplyTo=`email`
]]
<form method="post" action="[[~[[*id]]]]">
<label for="name">Name</label><input required="required" type="name" id="name" name="name" placeholder="Your name" value="[[!+fx.name]]">
[[!+fx.error.name]]
<label for="email">E-mail </label><input required="required" type="email" id="email" name="email" placeholder="Your email" value="[[!+fx.email]]">
[[!+fx.error.email]]
</div>
<div>
<label for="phone">Phone number</label> <input type="text" placeholder="Phone number" id="phone" name="phone" value="[[+fx.phone]]" size=15/>
<input type="checkbox" name="agree" id="agree"><label for="agree" [[!+fx.agree:FormItIsChecked=`true`]]>I agree</label>
[[!+fx.error.agree]]</div>
<button id="join">JOIN</button>
</form>
我发现http://bugs.modx.com/issues/4022在这里描述了这个错误,似乎这个问题必须解决 - 但是如何解决?我的 FormIT 版本 - 2.0.3