honeypot instead of non-accessible captcha
Captcha’s aren’t all that easy to implement actually and above all they aren’t accessible for visually impaired people.
Try a so-called honeypot instead, it’s just a few lines of code where you test whether an invisible field is filled out (which only a spambot would do). See for example this:
(sorry, it’s in German):
https://www.openwebboard.org/Tutorials/HTML_CSS/Barrierefreie_CAPTCHAs_1.html?1286521026#voting
The php code I’m using starts on line 301 of wpresponder.php in the plugin folder:
//a visitor is trying to subscribe.
if (isset($_GET['wpr-optin']) && $_GET['wpr-optin'] == 1)
{
# begin honeypot
if ($_POST['email2'] !== "")
{
exit('Gotcha');
}
# end honeypot
require "optin.php";
exit;
}
In my html template I have:
<h2>E-Mail Newsletter-Abo</h2>
<form action="<?php echo $ahl_root_abs; ?>?wpr-optin=1" method="post">
<span class="wpr-subform-hidden-fields">
<input type="hidden" name="blogsubscription" value="none" />
<input type="hidden" name="newsletter" value="1" />
<input type="hidden" name="fid" value="1" />
</span>
<label for="name">Name: </label>
<input type="text" name="name" />
<label for="email">E-Mail: </label>
<input type="text" name="email" />
<label for="email2">Hier bitte nichts eintragen sonst bekommst du eine Fehlermeldung Wiederholung E-Mail: </label>
<input class="email2" type="text" name="email2" value="" />
<input type="submit" value="Abonnieren" class="btn" id="newssubmit" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" />
</form>
In css I have:
input.email2 {
visibility: hidden;
height: 1px;
}
label[for="email2"] {
visibility: hidden;
height: 1px;
}
It’s not very sophisticated but it works and was genuinely easy to implement and test.