September 14, 201214 yr I have been thinking of incorporating captcha into a form I am creating to prevent spam, but as the form is quite complex, captcha is going to be a nightmare to incorporate, and I also think it looks terrible on a website But I have been thinking, what is it that spam bots look for, is it the : <input type="submit" value="Submit"/> ? If so I have an image as the submit button with a $.click() handler in an external js file to handle the event. Would spam still be able to submit the form wihout captcha? Edited September 14, 201214 yr by pilgrim_fgau
September 14, 201214 yr CAPTCHA's also a usability nightmare, but I wouldn't recommend using Javascript to submit your form; there are better ways. Try this instead: Add an extra text input field to the beginning of your form, with a common name that you're not actually using for your form. If you use "firstname" and "lastname", call it "name". If you use "name", call it "firstname". Hide the field using display:none in CSS (important to do it this way instead of using a hidden form field - the important thing is that the HTML should look like a normal form field to a spambot, but users shouldn't see it. Most screenreaders also respect display: none) Have your server-side form processing script discard any form submissions that have that field filled in. Genuine users will not see that field, and thus will leave it blank. Spambots will attempt to fill it in, because "name" or "firstname" will be common field names that they'll be programmed to fill.
September 14, 201214 yr CAPTCHA's also a usability nightmare, but I wouldn't recommend using Javascript to submit your form; there are better ways. Try this instead: Add an extra text input field to the beginning of your form, with a common name that you're not actually using for your form. If you use "firstname" and "lastname", call it "name". If you use "name", call it "firstname". Hide the field using display:none in CSS (important to do it this way instead of using a hidden form field - the important thing is that the HTML should look like a normal form field to a spambot, but users shouldn't see it. Most screenreaders also respect display: none) Have your server-side form processing script discard any form submissions that have that field filled in. Genuine users will not see that field, and thus will leave it blank. Spambots will attempt to fill it in, because "name" or "firstname" will be common field names that they'll be programmed to fill. Aren't you clever eh.
September 14, 201214 yr Aren't you clever eh. Yup, he is! That's why he's a respected moderator on one of the of the most popular web design forums on the internet who's contributions to this community have received one of the highest ratios of posts to upvotes/reputation.
September 14, 201214 yr Yup, he is! That's why he's a respected moderator on one of the of the most popular web design forums on the internet who's contributions to this community have received one of the highest ratios of posts to upvotes/reputation. Ok, you've either done something or you want something... Edit: or you had a false positive on your sarcasm detector. 99% certain it was sincere, cos my post got +Repped at about the same time Samus posted. Wasn't the OP, cos he hasn't been back since. Edited September 14, 201214 yr by Renaissance-Design
September 17, 201214 yr Author thanks for that, thats quite a nice way to do that to be honest! Edited September 17, 201214 yr by pilgrim_fgau
Create an account or sign in to comment