views:

698

answers:

3

Anyone have suggestions for creating an extremely simple form verification field using jquery? I need to block basic form spam. Would love to have some type of 1+1= field that us used to make sure it's a human submitting the form. I don't have the abilty to put .php or .asp on the site so it would need to rely on jquery or some other method.

Any suggestions??

+2  A: 

It's highly possible the robot script doesn't even have Javascript therefore it would be useless. I don't think this is feasible without a server-side solution.

meder
+1 agreed. they could have just submit it because the server doesn't validate the spam control.
thephpdeveloper
A: 

You cannot solve this issue on the client side (with Jquery). In a spam-submitting situation, the client cannot be trusted.

To solve this issue you will need to modify things server side.

A couple of suggestions that are probably enough

  1. Send a hash of some session variables unique to this user with the form, and validate on reply. This is to prevent replay attacks by detecting bad hashes.

  2. Add fields that should be left blank, and hide them using css. Spam bots will fill them out. Filter out submissions that contain data in these fields.

Tom Leys
A: 

Hi Mike

I've been searching for something like that also and I think I've found something useful that also looks nice: http://www.webdesignbeach.com/beachbar/ajax-fancy-captcha-jquery-plugin

I haven't tried this yet though.

Regards
    Sigersted

Sigersted