Quote from: rthrash at Aug 06, 2007, 02:19 PM
http://bjorkoy.com/past/2007/8/1/battle_comment_spam_with_an/
Synopsis: An interesting anti-spam measure by adding a CSS-hidden fake "lastname" form field that still should be visible to spambots. If it’s filled in, don’t accept the form submission, or accept it but just don’t actually do anything with the submission.
Here’s perhaps a better way I found. Rather than use display:none, it puts the div off the screen and shrinks it so it’s more-or-less invisible even in browsers that don’t honor the position. Google reportedly frowns on disply:none in its rankings.
CSS:
.my_input {
position:absolute;
text-decoration:underline;
background-color:#CC0000;
left:0px;
top:-500px;
width:1px;
height:1px;
overflow:hidden;
}
HTML:
echo '<div class="my_input">',
'<table><tr><td>Please refrain from entering<br> your Last Name here:</td><td>',
'<input type="text" name="lastname" size=30 ></td></tr></table></div>';
}
I’d credit the creator but I can’t find the reference.
Bob
Does anyone have an example of how this would be implemented with eForm?
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
A problem with this method is the the browsers auto-fill of form fields. Even though you are real person the browser could think it is doing it’s job and fills in the lastname even though it isn’t visible thereby invalidating your submission – not good.
Quote from: carlholmberg at Oct 09, 2007, 04:25 PM
A problem with this method is the the browsers auto-fill of form fields. Even though you are real person the browser could think it is doing it’s job and fills in the lastname even though it isn’t visible thereby invalidating your submission – not good.
Good point. I use Roboform (and highly recommend it --
http://roboform.com) and I suspect that it would fill this field for most people without them knowing it. Maybe ’Last__Name’ would prevent the autofill but still snare the spammers.
I have a working simple contact form snippet that uses this technique. I’ll post in the snippet "in development" forum if I ever have time to finish the docs bundle it up .
Bob
Quote from: rthrash at Oct 10, 2007, 09:53 AM
You can prevent autocomplete of certain form fields in most browsers by adding autocomplete="off" to your input tags like:
<input autocomplete="off" type="text" value="" name="lastname" id="lastname" />
Cool. I’ll have to check and see if that stops Roboform. Putting autocomplete="off" in the hidden field and in one real required field (e.g. subject) should foil a lot of spammers.
Bob
What about just requesting an easy arithmetic operation as captcha to the user? like 2 + 2 = ?
Randomize the numbers and the operators (+, - and *)...
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
Quote from: charliez at Oct 16, 2007, 04:19 PM
What about just requesting an easy arithmetic operation as captcha to the user? like 2 + 2 = ?
Randomize the numbers and the operators (+, - and *)...
I like it. I’m working on an ultra-spamproof contact form. I’ll see if I can work that in as an option in addition to the hidden field. I realized that if I just obfuscated the hidden field’s id a little(e.g. Last..Name) it would stop autofill.
Bob