[SOLUCIONADO] Como agregar campo reCaptcha V2

Hola Olga,

No, no ejecutes la acción cuando completa el recaptcha.

Lo que te decía era que deshabilites el botón, y lo habilites ni bien completa el recaptcha (data-callback=“recaptcha_ok”), seria algo así:


        function generar_layout()
        {
                $this->generar_html_ef('usuario');
                echo "<script src='https://www.google.com/recaptcha/api.js'></script>";
                echo "<script type="text/javascript">this.desactivar_boton('nombre-boton');</script>";
                echo '<div class="g-recaptcha" data-sitekey="6LdbOrUUAAAAAKsb-Lctl0vNZRp41hN0Jz0X_9Rc" data-callback="recaptcha_ok"></div>';

                echo '<script type="text/javascript">
                                function recaptcha_ok () {
                                    this.activar_boton('nombre-boton');
                                }
                             </script>';
        }

saludos.