Forum Moderators: open

Message Too Old, No Replies

ReCaptcha code with an error

         

toplisek

11:19 am on Jun 16, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have tested validation to be used by ReCaptcha.
API uses link <script src='recaptcha/api.js'></script>

and the following name:
if(isset($_POST['g-recaptcha-response'])){
$captcha=$_POST['g-recaptcha-response'];

As there is any name inside input but only g-recaptcha-response it will be refused by validator as an error and official Google Id name will not work.
SyntaxError: missing : after property id

When I use different ID (_) it will not work like:
g_recaptcha_response: {
required: "Required field!.",
},
How to solve this?
Need help.

coopster

2:14 pm on Jun 19, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Which version?
[developers.google.com...]

toplisek

11:35 am on Jul 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There is any version as it uses
<script src='https://www.google.com/recaptcha/api.js'></script>

<div class="g-recaptcha" data-sitekey=""></div>

It means it will use updated version.