Hi Folks
I'm attempting to add a maths 'bot killer' to my Formit data form.
By adding the &hooks=`math` and &validate=`math:required`
I can trigger the flag when the maths question is left blank.
However I cannot seem to work out how to trigger the flag if the sum is incorrectly entered.
Instead I get flags further back in the form suggesting either my email address field,
my message (text) field, or both is/are somehow incorrect.
In fact the message field gets emptied in the process.
All a bit weird.
Here is the actual relevant markup I've used on the site
(both local and remote).
<div class="maths-bot-killer">
<p><label>Not a bot? </label></p>
<p>
<label><strong>Ok then, what is [[!+fi.op1]] [[!+fi.operator:is=`-`:then=`minus`:else=`plus`]] [[!+fi.op2]]?</strong></label></p>
</div>
[[!+fi.error.math]]
<input type="text" name="math" aria-label="Enter the answer to the sum" 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]]" />
Any suggestions would be most welcome
Many Thanks
Chris
My setup is:
MODX 2.4.2
MAMP (latest (3.0.7.3))
PHP (5.5.18)
MySQL (5.5.38)
Chrome: Std and Canary (latest versions)
Mac OX (Lion-10.7.5).