Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Why is the form submitted even if the Math is wrong?
I connect ajaxForm like this:
[[!AjaxForm?
&form=`tpl.AjaxForm.5`
&snippet=`FormIt`
&hooks=`math,FormItSaveForm,email`
&mathMinRange=`1`
&mathMaxRange=`10`
&emailSubject=``
&emailTo=`[[#8.tv_01]]`
&emailFrom=`[[#8.tv_01]]`
&emailTpl=`tpl.email.4`
&validate=`math:required,name4:required,phone4:required,workemail4:blank,text4:required:stripTags`
&submitVar=`form4`
&validationErrorMessage=`В форме содержатся ошибки!`
&successMessage=`Сообщение успешно отправлено`
]]
<div class="math">
<div class="math_1">
[[!+fi.op1]] [[!+fi.operator]] [[!+fi.op2]]
</div>
<div class="math_2">
<input class="form-control" type="text" name="math" value="[[!+fi.math]]" />
<input type="hidden" name="op1" value="[[!+fi.op1]]" />
<input type="hidden" name="op2" value="[[!+fi.op2]]" />
<input type="hidden" name="operator" value="[[!+fi.operator]]" />
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question