Sites and CAPTCHA | Salesforce Developers Blog

I recently attended our Developer User Group meeting in NYC, we had a great time reviewing code and talking about Visualforce, Apex Code and Sites.

The UG meeting was held in the evening (6-9pm) at Le Meridien and more than 60 developers came out to learn about the platform, building apps and to learn from each other.

I gave a quick technical overview of the platform and spent a bit more time on new technologies such Sites and for Google App Engine. Ketan Khandkar, Principal at Navatar Group gave a presentation and covered some best practices for building native apps with Visualforce, He had a great demo for us. Thanks to Navatar Group from sponsoring this event !

One of the topics that we discussed was how easy or hard would it be to construct a CAPTCHA challenge for a Sites input form, such as those that you often see in blogs or conference registration applications.

Well, I was nothing if not curious, so I spent some time researching this and quickly found out just how easy it is to build a CAPTCHA component for Visualforce. In fact, it's so easy that I built this sample here, it took a few hours because I had to study the Ajax code provided by the reCAPTCHA project. Check out this article if you would like to learn more about input forms on sites.  There is even a working example linked into my developer edition Site, you can test your own human pattern recognition skills.

Enjoy the code and let us know if you would like to have a Developer User Group in your area.

Ron Hess

Stay up to date with the latest news from the Salesforce Developers Blog