We have a website running on MODX Revolution 2.2.4-pl (traditional)
Earlier we used recapcha with formit (formit 2.1.2). Now as google stops supporting recaptcha we tried to use in recaptcha v2 & v3 with this setup. But failed to render the captcha.
My code :
[[!FormIt? &hooks=recaptchav3,email,redirect
&emailTpl=sentGeneralEmailTpl
&emailSubject=IMPORTANT: General Query
&emailTo=[email protected]
&emailFrom=[email protected]
&redirectTo=72
&validate=name:required,email1:required,subject:required,message:required,mobile:required
]]
and
[[!recaptchav3_render]] [[!+fi.error.recaptchav3]]
Keys are generated properly and able to render the captcha in php pages.
Any suggestion shall be highly appreciated.
Regards,
Sandip
Not related to your question but do please upgrade your MODX version. There are some critical security issues that you’ve missed by not upgrading.
1 Like
We are trying to do the same also and struggling. I may need to open a separate topic.
Also upgrade your FormIt version then I would suggest trying to use the example form towards the bottom of the README on a blank template as a test.
# ReCaptchaV2
ReCaptchaV2 (version 3.x) integrates V2 AND V3 of Google's ReCaptcha service into MODX as a FormIt hook.
It can also be used with the Login Extra as a preHook, as of version 1.0.0
Version 2+ updates the base Google Recaptcha class to the latest 1.1.2, including autoloading and cURL support. https://github.com/google/recaptcha
You must generate API keys for your domain here: [https://www.google.com/recaptcha/admin](https://www.google.com/recaptcha/admin)
and enter them into the System Settings before you can use ReCaptchaV2. **IMPORTANT**: You must choose V2 or V3 in the ReCaptcha admin, when generating your client keys. You can use both V2 and V3 on a single MODX install with this Extra—**there are separate system settings for V2 and V3**.
### USAGE EXAMPLES:
```
[[!FormIt?
&hooks=`recaptchav3,email`
...
]]
```
OR
This file has been truncated. show original