Math Captcha for Forms

</ head>

</ body>

<!-- MATH CAPTCHA --> 
<script src="https://cdn.jsdelivr.net/gh/CodeCrumbsApp/math-captcha@0.1.7/index.min.js"></script>

<script>
  window.CodeCrumbs.MathCaptcha({
    formClassSelector: ".contact-form",
    captchaLabelSelector: ".math-label",
    captchaInputSelector: ".math-field",
    validTargetAttribute: "valid-captcha-class",
    invalidTargetAttribute: "invalid-captcha-class",
    removeClassesOnEmptyInput: true
  })
</script>

HTML/Embed

Only tabs with a " " have code.
<!-- MATH CAPTCHA --> 
<script src="https://cdn.jsdelivr.net/gh/CodeCrumbsApp/math-captcha@0.1.7/index.min.js"></script>

<script>
  window.CodeCrumbs.MathCaptcha({
    formClassSelector: ".contact-form",
    captchaLabelSelector: ".math-label",
    captchaInputSelector: ".math-field",
    validTargetAttribute: "valid-captcha-class",
    invalidTargetAttribute: "invalid-captcha-class",
    removeClassesOnEmptyInput: true
  })
</script>
Only tabs with a " " have code.
Only tabs with a " " have code.
<!-- CodeCrumbs -->
<script>
!function(e,t){e[t]=new Proxy(e[t]||{},{get:(e,o)=>new Proxy(e[o]||function(){},{apply:(n,r,a)=>{const c=()=>e[o](...a);"complete"===document.readyState?c():document.addEventListener("readystatechange",(n=>{"complete"===n.target.readyState&&(e?.[o]?c():console.error(`${t}.${o} is not a function. Did it load correctly from the CDN? If not, did you use the correct name.`))}))}})})}(globalThis,"CodeCrumbs");
</script>
Only tabs with a " " have code.
If you have already pasted this code into your project then you can skip this. If you haven't, and it's your first time using CodeCrumbs, then copy this code and navigate to your sites global settings > Custom Code tab > paste it into the <head> (first custom code block). It just needs to exist once.
Author
Noah Raskin
Updated on
Apr 3, 2023

How to use:

Tutorial Coming Soon!

Check Browser Support

Interactive Table

Prevent spam with this awesome code snippet that validates the submission by answering a simple math problem.

Clone Project
Documentation
Author:
Status:
Deprecated
New
Updated
Latest Version:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor