Great Module, thanks.
I had some luck getting this to integrate with FormBuilder (method d) by using the following Form Builder hook to check the recaptcha before submitting:
$forms->addHookBefore('FormBuilderProcessor::processInputDone', function ($e) use ($captcha) {
$form = $e->arguments(0); // retrieve argument by number (zero based)
// Check to see if recaptcha is true
if ($captcha->verifyResponse() === true) {
// This will process the form as usual
} else {
// This will cause an error on form and stop processing
$form->error('Recaptcha is missing. Please tick I\'m not a robot and try again');
}
});
More info on FormBuilder hooks: https://processwire.com/blog/posts/formbuilder-v34/
Cheers,