Extension

Archived
Forum
(read-only)

reCAPTCHA v2

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Denik

     

reCAPTCHA v2 not showing on EE v2.9.2 freeform

Bug Report

jhuo
jhuo

steps followed
0. Uninstalled and disabled recaptchav1.
1. Copied recaptchav2 to third_party folder.
2. Installed and Enabled recaptchav2 in control panel
3. Configured recaptchav2 : entered Site Key and secret key. Do not add script. Show response No.
4. In the include template for the form, added

  {if freeform:captcha}
  <div class=“captcha”>
  Please enter the text/numbers you see to help prevent spam *:

  {freeform:captcha}

</div>
  {/if}

nothing is showing on the web page…Am I missing anything. Appreciate your help!

Denik
# 1
Developer
Denik

Hello,

If you select “Do not add script (manual variant)” in settings, then you need include script by manualy in HEAD of your document using global variable: {recaptcha:script:html} or {recaptcha:script} (for including into your scripts).

You can see all available global variables in the online documentation: http://eecoding.com/docs/recaptchav2#global-variables

Best regards!

jhuo
# 2
jhuo

Thanks so much quick response. I am new to EE. Can you please tell me syntax to include the variable?

Denik
# 3
Developer
Denik

Example, for include variable into your template simple write “{recaptcha:script:html}”:

<!DOCTYPE html>
<
html lang="en">
<
head>
 <
meta charset="UTF-8">
 <
title>Document</title>
 
{recaptcha:script:html}
</head>
<
body>
...
Your document... 

Your document type for template must be set to “Web page”. http://prntscr.com/kp409i

jhuo
# 4
jhuo

It worked great! Thanks so much!!

Denik
# 5
Developer
Denik

I am always glad to help you. Please do not hesitate to contact me if you have any problems