Expand my Community achievements bar.

How to deal with spammers on forms

Avatar

Level 1
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!
2 Replies

Avatar

Level 10

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, 8) // 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.

Avatar

Level 10

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.