Is it possible to use Foundation's Abide Validation as a spam preventative? I'd like to ask a simple question at the end of my form, i.e. 'What is 2+2?'. The answer must be 4 to submit the form.
Something like this:
<form data-abide>
<div class="row">
<div class="small-12 column">
<input type="text" placeholder="what is 2 + 2?" required>
<small class="error">You're not very good at math, are you?</small>
</div>
</div>
</form>
Yes, I had implemented what you described in a previous project, and it worked as a spam deterrent.
You first need to create a JS function to handle your question by adding it as a custom validator to Abide. This may work for your 2+2 question. Add the following to the bottom of your HTML file:
Also, you now have to add the validator as an attribute:
That should work. Good luck.