Found instructions for how to add KeyCaptcha manually to Form Builder. Thought I'd share;
1. Add the standard recaptcha field to your form, set type to manual in settings and write some value to private and public key.
2. Create some form with keycaptcha (use instruction for other CMS) and copy keycaptcha JS code. It should look like:
<script type='text/javascript'>
var s_s_c_user_id = '25071';
var s_s_c_session_id = '52133a2306d0e-4.0.0.001';
var s_s_c_captcha_field_id = 'capcode';
var s_s_c_submit_button_id = 'but1';
var s_s_c_web_server_sign = '28fcd48462b5d5f63c634a474f736e12';
var s_s_c_web_server_sign2 = '368fe4dc8f8915a0afb83783cd7f311a';
</script>
<script language=JavaScript src='http://back5.keycaptcha.com/swfs/cap.js'></script>
3. Edit your form template /formName/formName.html file
replace recaptcha code;
<script type="text/javascript">var RecaptchaOptions = { lang : 'en', theme : 'white', };</script>
<script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=6LeVLNASAAAAALwMSC6gkF17kw3nQWFxSmrMe1Ah"></script>
<noscript><iframe src="https://www.google.com/recaptcha/api/noscript?k=6LeVLNASAAAAALwMSC6gkF17kw3nQWFxSmrMe1Ah" height="300" width="500" style="border:none;"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
</noscript>
with:
<input type="hidden" name="recaptcha_challenge_field" id="recaptcha_challenge_field" value="false" />
<input type="hidden" name="recaptcha_response_field" id="recaptcha_response_field" value="false" />
%KEYCAPTCHA_JS_CODE_FROM_STEP_2%
and add
<script type="text/javascript">
document.getElementById('fb-submit-button').setAttribute( 'data-disabled', 'disabled' );
document.s_s_c_additionalcheck = function(){
document.getElementById('fb-submit-button').setAttribute( 'data-disabled', '' );
document.getElementById('fb-submit-button').click();
}
</script>
to the end of the page.
4. Copy file keycaptcha_class.cls.php from attach to %formName%/fbapp/php/ directory
5. Edit file %formName%/fbApp/inc/recaptchalib.php and replace recaptcha_check_answer's body to
$kc_o = new KeyCAPTCHA_CLASS('%YOUR_KEYCAPTCHA_PRIVATE_KEY_FROM_JOOMLA_INSTRUCTION %');
$recaptcha_response = new ReCaptchaResponse;
if ($kc_o->check_result($response)){
$recaptcha_response->is_valid = true;
}else {
$recaptcha_response->is_valid = false;
$recaptcha_response->error = 'Wrong captcha';
}
return $recaptcha_response;
Hopefully this will help others until KeyCaptcha is added to Form Builder
You do not need a parachute to skydive. You only need a parachute to skydive twice.