javascript - Kentico reCaptcha 不会阻止表单提交

标签 javascript jquery forms recaptcha kentico

我的 WebPart 中有 reCaptcha FormControl

<script src='https://www.google.com/recaptcha/api.js'></script>
......

    <div class="form-group">
        <label>Please type the word below. If required use the buttons to change or listen to the word.</label>
        <cms:RecaptchaControl ID="reCaptchaVld" runat="server" data-theme="clean" data-callback="cpCallBack();" PrivateKey="xxxxxxxxx" PublicKey="xxxxxxxxx" data-recaptcha="" CssClass="g-recaptcha" /> 
    </div>

我做了一个测试,填写了所有必填字段,但将 reCaptcha 保留为空白或未选中,单击“提交”按钮,表单已成功提交。

我错过了什么吗?

最佳答案

如果是您的自定义Web部件,您需要调用IsValid()方法来检查文本输入是否正确。

关于javascript - Kentico reCaptcha 不会阻止表单提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30203959/

相关文章:

javascript - 获取元素ID并显示在页面上

javascript - 在某个点停止固定元素滚动?

php - 通过 php 脚本加载图像时如何缓存图像

javascript - 预加载音频文件/事件?

html - WCAG 错误 : broken rule regarding label for email input (What am I missing?)

javascript - Angularjs - 从指令更新父范围

javascript - 链接到 jquery 选项卡的特定选项卡

jquery - 用于 Eclipse 和 jQuery 代码辅助的 Aptana 插件

jQuery - 当存在多个表单时识别特定表单数据

javascript - jQuery 计算表格