All guides

Protect a website form from spam

Review held submissions in Wiztrom, restrict browser origins, and add Cloudflare Turnstile to an existing HTML form.

Review held submissions

Open Spam in the workspace dashboard. Wiztrom holds submissions that fill the hidden honeypot field separately from the inbox for up to 30 days. Approve a legitimate submission to move it to the inbox and send its notifications, or delete it. Held submissions use a separate allowance until approved.

Check which website is sending the form

Open your form in Forms and select Spam protection. Add the exact origins of your published site and any preview you still use, such as https://www.example.com. Start in Report only and run Verify your form from each published origin. Enforce only for browser forms that send an allowed Origin header. Server-to-server posts and some browser privacy settings omit that header.

Add a Cloudflare Turnstile widget

In your Cloudflare account, create a managed Turnstile widget for the hostnames visitors use. Save its site key and secret in the form’s Spam protection settings with Report only selected. In your webpage, load the script once and put the widget inside the existing form. Use your site key in the HTML. Keep the secret in Wiztrom.

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

<!-- Inside the form, before the submit button -->
<div class="cf-turnstile" data-sitekey="YOUR_SITE_KEY"
     data-action="wiztrom_submit"></div>

Verify the published form before enforcing

Start a test in Verify your form. Send the code from your published website and check Protection checks in the report. If your submit button uses JavaScript, include the widget’s cf-turnstile-response field with each POST and reset that widget after the request so the next attempt has a fresh token. Switch to Enforce after your published form passes, then send one more test.

References