Recaptcha on SS3.6


#1

SS3.6

Trying to get silverstripe-recaptcha working on a form. I have installed it as laid out in the ReadMe on GitHub, but it doesn’t seem to do anything. It breaks the form and doesn’t seem to call the Submit handler function.

I have not added any javascript code.
I have done a dev/build?flush

In the form code:

		$form = Form::create ($this, 'JoinForm', $fields, $actions, $required);
		$form->enableSpamProtection([
			'protector' => 'RecaptchaProtector',
			'name' => 'Captcha'
		]);

recaptcha.yml:

---
Name: recaptcha
---
FormSpamProtectionExtension:
  default_spam_protector: RecaptchaProtector
  
RecaptchaField:
  public_api_key: "xxx"
  private_api_key: "xxx"