Code Monkey home page Code Monkey logo

Comments (5)

Wuelle avatar Wuelle commented on July 30, 2024 1

You can do something like this

doomcaptcha/script.js

Lines 22 to 27 in 0e426e4

window.addEventListener('message', function(e) {
if (e.origin.indexOf('vivirenremoto.github.io') > -1) {
captcha_done = true;
document.getElementById('doom_captcha').style.borderColor = 'black';
}
}, false);

So to disable/enable the button you would define the button like this:

<button id="submit" disabled>Submit</button>

and in the EventListener above you would just add the line

document.getElementById('submit').disabled = false;

to enable the button

from doomcaptcha.

vivirenremoto avatar vivirenremoto commented on July 30, 2024

hi @smartm0use ,

in the demo page you can click the submit button, but it doesnt send the form until you complete the captcha, I thought it would be a good idea to highlight the captcha to red to help the user understand that he must complete the captcha first.

the solution by @Wuelle is a good one, but you shoud upload the doom captcha in your server.

i'm not sure if this helps you, but thanks for your comment

from doomcaptcha.

smartm0use avatar smartm0use commented on July 30, 2024

Thank you for your replies.
Instead, what about integrating it in Wordpress (Contact Form 7)? Any way to have it?

from doomcaptcha.

vivirenremoto avatar vivirenremoto commented on July 30, 2024

@smartm0use i think Its only copy & paste the Doom captcha JavaScript line (the blue line) before the [submit] tag of WP Contact Form and save it....

from doomcaptcha.

smartm0use avatar smartm0use commented on July 30, 2024

Yes, pasting the script before [submit] tag does the trick. Anyway I also tried to add some custom javascript to enable/disable button or to prevent form to be submitted, but custom logic seems not to work within Contact Form 7...

from doomcaptcha.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.