We've created an addon for CouchCMS that creates a new CMS input type for the Google V2 reCaptcha as seen below.
CouchCMS has a Captcha type of its own but it's not as user friendly or simple to use as the new reCaptcha box, which requires just one click from a user to verify themselves as human. Read more about Google reCaptcha V2.
If you aren't familiar with Couch's Input tags within Forms, you should familiarise yourself before reading this post.
To Install the Addon, Extract the Recaptcha folder into Couch's 'couch/addons' folder.
Locate "Kfunctions.php" inside of the 'couch/addons' folder
NOTE: There may only be a file named 'kfunctions.example.php' in the addon folder. Please rename this file to 'kfunctions.php'.
Add the following lines to your 'kfunctions.php' file:
require_once( K_COUCH_DIR.'addons/recaptcha/recaptcha.php' );
define( 'RECAPTCHA_SITE_KEY', 'your_site_key' );
define( 'RECAPTCHA_SECRET_KEY', 'your_secret_key' );
Now you may place the new input type anywhere within a CouchCMS form to render the Google reCaptcha box.
<cms:input type="recaptcha" name="recaptcha" />
Optional. The message to show when the reCaptcha does not return successful or is not filled in. This will output with couches 'k_error' list. (See: Couch concept - Forms)
These parameters are all related to reCaptchas parameters and allows for control of them via the couch input tag. Please read Google's documentation.
Optional. Google's Parameter 'data-type'. Default: 'image'
Optional. Google's parameter 'data-theme'. Default: 'light'
Optional. From Google Doc's: "The callback function that gets called when all the dependencies have loaded."
Optional. Google's language parameter. (See: language codes) for a list of supported languages and codes to use.
Optional. Callback parameter - From Google Docs: "Your callback function that's executed when the user submits a successful CAPTCHA response."
Optional. Expired callback parameter - From Google Docs: "Your callback function that's executed when the recaptcha response expires and the user needs to solve a new CAPTCHA."
Optional. Google data-tabindex parameter - From Google Docs: "The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier."