Using a Honeypot captcha

The honeypot captcha is a hidden anti-spam measure that requires no user interaction and blocks most automatic form submissions.

Step 1

Add this field anywhere inside your form HTML

1
2
3
<div class="quform-hidden">
    This field should be left blank <input type="text" name="field">
</div>
<div class="quform-hidden">
    This field should be left blank <input type="text" name="field">
</div>

Step 2

Add this code to your form process file (e.g. process.php) at the element confuration section:

1
2
3
4
$honeypot = new Quform_Element('field');
$honeypot->addValidator('honeypot');
$honeypot->setIsHidden(true);
$form->addElement($honeypot);
$honeypot = new Quform_Element('field');
$honeypot->addValidator('honeypot');
$honeypot->setIsHidden(true);
$form->addElement($honeypot);
Be inspired. © 2018 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy