
//-- Honeypot
if ($saveComment && !empty($_POST['body'])) {
$this->form['error'] = 10;
unset($pObj);
return;
}
[+form.error:select=` &-3=You are trying to re-submit the same post. You have probably clicked the submit button more than once. &-2=Your comment has been rejected. &-1=Your comment has been saved, it will first be reviewed before it is published. &1=You are trying to re-submit the same post. You have probably clicked the submit button more than once. &2=The security code you entered was incorrect. &3=You can only post once each [+jot.postdelay+] seconds. &4=Your comment has been rejected. &5=[+form.errormsg:ifempty=`You didn't enter all the required fields`+] &10=I believe you're a bot. `+]
<label id="bodyhp"><span>Body</span><br />
<input class="form-input" name="body" type="text" value="" id="body" />
</label>
label#bodyhp {
display: block;
height: 1px;
overflow: hidden;
padding-top: 1px;
}
I’ve been using it with eForm for some time now with no complaints from clients and no spam from my contact form. I haven’t added it to my site’s Jot installation though.
<input tabindex="50" type="text" name="Last__Name" id="LastName" size=30 autocomplete="off" eform="LastName::0" />
[!getServer!]
[!checkField!]
[!eForm? &formid=`ContactForm` &tpl=`ContactForm` &report=`ContactReport` &to=`[email protected]` &subject=`sottwell.com Contact` &thankyou=`ThankYou` &from=`[+email+]` &fromname=`[+name+]` &replyto=`email` &eformOnBeforeMailSent=`getServer` &eformOnValidate=`checkField`!]function checkField(&$fields,&$vMsg,&$rMsg) {
if(!empty($fields['Last__Name'])) {
return false;
} else {
return true;
}
}<input type="text" name="surname" id="surname" size="30" value="" autocomplete="off" eform="Surname::0:Must be a spam bot:#EVAL if(empty($_POST['surname']){return true;} else return false;" /> #EVAL - string of php code. Should return either true or false
deprecatedAlthough #EVAL still works in eForm 1.4 this rule will very likely no longer be supported in future versions. Use #FUNCTION instead.