Thursday, October 6, 2016

Using Google's re-Captcha in BlueBox Forms

A simple integration in BlueBox ERP allows you to embed Google re-Captcha form protection into your BlueBox forms.

Once you have registered your new re-Captcha with Google, you can use your public and secret keys as follows:

if(bb_recaptcha_verify::verify("my-secret-goes-here")){
//re-captcha was ticked
}else{
//re-captcha failed
}

The form needs to have the following added to it at the place where the re-Captcha tickbox needs to appear:

<script src='https://www.google.com/recaptcha/api.js'></script>
<div class=\"g-recaptcha\" data-sitekey=\"your-public-key-goes-here\"></div>

No comments:

Post a Comment