Skip to main content

Automated HTML Form Validation

When Auto Form Validation is enabled, the MTCaptcha widget will automatically prevent the HTML form submission unless the captcha is solved. It will also show a "please complete" prompt message as below if the captcha is not solved on an attempted form submission.

Code Generator Snippet

To enable auto form validation, use the autoFormValidate JavaScript config parameter:

<script>
var mtcaptchaConfig = {
"sitekey": "<YOUR SITE KEY>",
"autoFormValidate": true
};
...
</script>