Closed abidi12 closed 2 years ago
Hi @abidi12!
First of, did you use the Attribute API or the JS API to create your widget?
Depending on which you used, the way you can check the status of the widget differs.
For the Attribute API: You can use the data-callback attribute. Here you can define a method that is called when the widget finished solving the puzzle. The function can have one argument, were the solution will be passed.
For the JS API:
There are multiple callbacks you can pass in the options when creating the widget: doneCallback
, startedCallback
, errorCallback
. Here, the doneCallback
will probably be the one you are using. Again, like in the Attribute API, the callback method can take one argument, which will be the solution.
These callbacks only send you the generated solutions. You still have to verify those found solutions in your backend, via our Verification API
I hope I could clear things up!
Hi @Fancy11111
`
The most pragmatic approach is generally to enable the submit button of your form in the doneCallback
or errorCallback
, that way users won't accidentally submit without the widget done solving.
I'm using FriendlyCaptcha and have been able to add the CAPTCHA component to my page inside a form. But when I submit the form there's no validation taking place to check if the CAPTCHA has been solved.
`<!– Add the widget script –>
` How do I validate that the CAPTCHA component has been solved when submitting my form? Or, in other words, how do I make my CAPTCHA component required? (using javascript)