3

We are looking to integrate FreeForm with the new Google Recaptcha (https://www.google.com/recaptcha), but are unsure where to begin. I was wondering whether anyone had any experience of doing this and can kindly point us in the right direction.

Any help greatly appreciated

Jonathan

1
  • I'm looking for an answer to this questions as well. Any suggestions? Commented Feb 25, 2016 at 0:02

2 Answers 2

2

You'll need to write an extension that uses freeform_module_validate_begin hook. Inside if your extension method you can look for ee()->input->post('g-recaptcha-response'), and if present, validate it via the reCAPTCHA API.

If it fails, you can add an error to the $errors array, e.g.:

$errors[] = 'Sorry, but you failed the test. Are you sure you're human?';
return $errors;

Otherwise, you can just return the $errors array is-is.

0

There is a ready to use plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.