Are you a human (Captcha Substitute)
Marketing are interested in replacing simple captcha in our SF site with this:
http://areyouahuman.com/demo
I signed up for free and got the .net installation instructions
http://portal.areyouahuman.com/installation/dot_net (requires site login i think)
But initial run through in SF did not work.
Before I delve into it in depth I wondered if anyone had already done this integration, and could give me some tips.
If not i will get it working myself ( eventually) and report back on my findings.
Where are you putting it, on Forms?
no i am chucking it onto a custom widget which is a form which triggers an email...written by a predecessor....
Hmm, based off of this?
http://gsaadeh.com/blog/11-07-20/Forms_Module_Notification_1_2.aspx
in the course of trying to implement it i did some googling and found a youtube video of a guy who has written scripts to beat it... so not much point in bothering..
Well let me just note then, that a postback event on a control that inherits from the SF forms control happens AFTER the form is submitted, so you need to hook into InitializeControls and wire up the BeforeFormSave event to check the captcah
protected
override
void
InitializeControls(GenericContainer container)
if
(!SystemManager.IsDesignMode)
//Hide the form if JS is disabled, it'll let them bypass the required fields.
base
.InitializeControls(container);
this
.BeforeFormSave +=
new
EventHandler<CancelEventArgs>(FormsControlCustom_BeforeFormSave);
protected
void
FormsControlCustom_BeforeFormSave(
object
sender, CancelEventArgs e)
bool
canSendEmail =
true
;
if
(
this
.MyCaptcha !=
null
)
if
(!
this
.MyCaptcha.IsValid)
e.Cancel =
true
;
this
.MyCaptcha.ErrorMessage =
this
.CaptchaErrorMessage;
canSendEmail =
false
;
if
(canSendEmail)
SendEmail();