Set up Cloudflare Turnstile

Add a challenge to a hosted form or your own site. Test it in Report only before requiring it.

Create a Turnstile widget

In Cloudflare, create a widget for the hostnames that display your form and copy its site and secret keys. For an iframe embed, use the hostname inside the iframe. Use a stable HTTPS hostname for a staging site you intend to protect.

Save the keys on the form

In Wiztrom, open Forms, then Spam protection on the form. Add the exact origins, set Turnstile verification to Report only, and save the two keys. Keep the secret in this settings screen. Only the public site key belongs on the webpage.

Publish the widget

Wiztrom hosted forms render the widget when Turnstile is enabled. For your own HTML, use Copy Turnstile HTML or add the script once and place the widget inside the form, above Submit. Keep your existing fields and use the wiztrom_submit action.

HTML
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js"
        async defer></script>

<!-- Inside the existing form -->
<div class="cf-turnstile" data-sitekey="YOUR_SITE_KEY"
     data-action="wiztrom_submit"></div>

Send a fresh token with each attempt

A native HTML form sends cf-turnstile-response with the other fields. If you use fetch with FormData, keep that field in the request. If you build JSON, copy the token to the same key. Reset the widget after each request to get a fresh token for the next attempt.

Verify before switching to Enforce

Choose Verify your form and send the test from your published URL. Check Spam protection checks in the report. Once the challenge passes, switch to Enforce and submit another test. Recheck the form’s Spam activity after deployment to catch missing tokens, hostname or action mismatches, and verification errors.

References