Bind mode
Hook the widget to an existing submit button. No extra DOM, no UI rewrite — the click triggers verification, and your form submits after success. View source.
Live demo
Click the existing submit button — the widget intercepts, verifies, then your handler fires.
Integration code
<script src="https://cdn.captcha-cdn.net/captchala.js"></script> <!-- Your existing form, untouched --> <form action="/login" method="POST"> <input name="email" required> <input name="password" type="password" required> <input name="captcha_token" type="hidden"> <button id="login-btn" type="submit">Sign in</button> </form> <script> Captchala.init({ appKey: 'YOUR_APP_KEY', product: 'bind', bindTo: '#login-btn', action: 'login', onSuccess: (res) => { // Insert token, submit form programmatically. document.querySelector('[name=captcha_token]').value = res.token; document.querySelector('#login-btn').form.submit(); } }); </script>
When to use bind
Adding verification to an existing form without redesigning the UI. The widget hooks the button click, completes verification, then submits the form normally — your existing backend handler doesn't change at all (it just sees a new captcha_token field).