Kentico reCaptcha不会阻止表单提交 [英] Kentico reCaptcha does not block form submission

查看:376
本文介绍了Kentico reCaptcha不会阻止表单提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的WebPart中有reCaptcha FormControl

I have the reCaptcha FormControl in my WebPart

<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,单击提交"按钮,表单已成功提交.

I did a test that I filled all required field but leave the reCaptcha blank or unchecked, clicked Submit button and the form was submitted successfully.

我错过了什么吗?

推荐答案

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

If it is your custom webpart, you need to call the IsValid() method to check whether the text was correctly entered.

这篇关于Kentico reCaptcha不会阻止表单提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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