Highlighted

How to deal with spammers on forms

jcm48

10-03-2009

Is there any way to defeat spammers who latch onto our forms and fill them out? One form developer I've used before has a "Captcha" feature that generates a random alphanumeric field that the form user has to re-create before he/she submits the form...but LiveCycle Designer doesn't appear to have this capability. Can anyone help? (Our forms are submitted via email.)



Thank you!

Replies

Highlighted

Niall_O_Donovan

30-06-2009

Hi,

A bit late, but I was researching random numbers and Jono Moore put forward a function for the Universally Unique Identifier (UUID).

You could set up two textfields: captcha and userInput

the calculate event of captcha would have the following Formcalc:

     var vUUID = Uuid(1)
     $ = Left(vUUID, 😎 // returns a random alphanumeric 8-digit code

The user would be prompted to input that code into the userInput field which would have the following Javascript in the exit event:

     if (this.rawValue = captcha.rawValue)

     {

          submitButton.presence = "visible";

     }

     else

     {

          submitButton.presence = "hidden";

     }

The submitButton presence should be initially set up as invisible/hidden and you can shorten the code to less than 8-digits.

Hope that helps,

N.

Highlighted

Niall_O_Donovan

30-06-2009

on reflection a better Javascript for the captcha object (calculate event) would be along the lines of:

chars = "abcdefghkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWXYZ23456789";

var sCaptcha = "";

     for(x=0;x<6;x++)

     {

          i = Math.floor(Math.random() * 53);

          sCaptcha += chars.charAt(i);

     }

this.rawValue = sCaptcha

This way you can avoid having similar characters in the field (i, I, l, 0, O). Use a clear font and large font size.

N.