如何使 Google reCAPTCHA 成为必填字段? [英] How to make Google reCAPTCHA a required field?

查看:43
本文介绍了如何使 Google reCAPTCHA 成为必填字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将 Google 的 No CAPTCHA reCAPTCHA 设为必填字段?
我的意思是,我想用 HTML 或 JavaScript 检查它.

How can I make Google's No CAPTCHA reCAPTCHA a required field?
I mean, I want to check it with HTML or JavaScript.

推荐答案

您需要做的是阻止表单提交,直到您可以使用 Google reCaptcha 验证回调验证用户响应,然后,如果通过,则允许表单提交要提交的表格.请参阅此答案:Google ReCAPTCHA 如何成为必需的?和还要检查文档:https://developers.google.com/recaptcha/docs/display#示例

What you have to do is prevent the form submission until you can validate the user response by using the Google reCaptcha verify callback, then, if it passes, allow the form to submit. See this answer: Google ReCAPTCHA how to make required? and also check the documentation: https://developers.google.com/recaptcha/docs/display#example

这篇关于如何使 Google reCAPTCHA 成为必填字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆