Last update on:
Jul 4, 2024

How to avoid spam in Webflow form submissions?

How to avoid spam in Webflow form submissions?

If you're a Webflow user, you've likely encountered an increasingly frustrating problem: spam submissions in your forms. Not only do these unwanted messages fill up your inbox, but they also make it hard to find and respond to real leads.

The impact of form spam can be significant:

  1. Wasted time sorting through irrelevant submissions
  2. Increased risk of missing important messages from real users
  3. Potential security risks if spam contains malicious content

In this comprehensive guide, we'll explore 5 different methods to combat spam in your Webflow forms. We'll start with free, easy-to-implement solutions and progress to more advanced options that may require additional services or costs. By the end of this article, you'll have a toolbox of strategies to keep your forms clean and your inbox spam-free. Let's dive into it:

Method 1: Implementing reCAPTCHA

Google's reCAPTCHA system is a popular and free service designed to protect websites from spam and abuse. It's an excellent first line of defense against form spam and is relatively easy to set up in Webflow.

Avoid spam in Webflow forms using reCAPTCHA

reCAPTCHA uses advanced risk analysis techniques to tell humans and bots apart. The most common version you've likely seen is the "I'm not a robot" checkbox, which may sometimes require users to complete an image selection task.

Pros and cons of reCAPTCHA for avoiding form spam

Pros:

  • Easy to implement in Webflow
  • Free for most websites (up to 1 million queries per month)
  • Widely recognized and trusted by users

Cons:

  • May not stop sophisticated bots that can solve CAPTCHAs
  • Can sometimes create friction for legitimate users
  • Ineffective if bots are bypassing your form and submitting directly to your form handler URL

Setting up reCAPTCHA in Webflow

Follow these steps to implement reCAPTCHA on your Webflow forms:

Add the reCAPTCHA field:

  1. In the Webflow Designer, go to the "Add Elements" panel.
  2. Navigate to the "Forms" section.
  3. Drag and drop the "reCAPTCHA" element into your form, ideally placing it just before the submit button.
Avoid spam in Webflow forms using reCAPTCHA - Add reCAPTCHA field

Register your site in the Google reCAPTCHA admin console:

  1. Visit the Google reCAPTCHA admin console.
  2. Sign in with your Google account.
  3. Click the "+" button to add a new site.
  4. Choose "reCAPTCHA v2" and select the "I'm not a robot" checkbox.
  5. Enter your domain(s) in the "Domains" field. Include both your Webflow subdomain (e.g., yoursite.webflow.io) and your custom domain if you're using one.
  6. Accept the Terms of Service and click "Submit".
  7. You'll receive two keys: a Site Key and a Secret Key. Keep these handy for the next step.
Avoid spam in Webflow forms using reCAPTCHA - Create reCAPTCHA API

Enable reCAPTCHA in Webflow:

  1. In your Webflow project, go to "Project Settings" > "Forms" tab.
  2. Scroll down to the "reCAPTCHA validation" section.
  3. Paste your Site Key and Secret Key into the respective fields.
  4. Toggle on "Enable reCAPTCHA validation".
  5. Click "Save Changes".
Avoid spam in Webflow forms using reCAPTCHA - Connect API in Webflow

Publish your site:

  1. After making these changes, publish your Webflow site for the reCAPTCHA to take effect.

An important note: If your Webflow form's submission URL (aka form handler) has already been identified by bots, implementing reCAPTCHA alone may not be sufficient, as in such cases, bots can bypass the form on your website and submit spam directly to the form handler URL. If you suspect this is happening, you may need to combine reCAPTCHA with other methods or move on to more advanced solutions.

Method 2: Form validation using JavaScript

For a more customizable approach to spam prevention, you can implement JavaScript-based form validation. This method allows you to check the content of form inputs against a list of banned words or phrases, effectively blocking submissions that contain suspicious content.

Avoid spam in Webflow forms using JavaScript validation

This technique involves adding a custom script to your Webflow site that:

  1. Monitors the content of specified form fields
  2. Checks this content against a predefined list of banned words
  3. Disables the submit button if any banned words are detected

Pros and cons of JavaScript form validation in Webflow

Pros:

  • Highly customizable – you can easily update the list of banned words
  • Works at the browser level, preventing spam submissions before they're sent
  • No additional costs or third-party services required

Cons:

  • Requires basic knowledge of JavaScript to implement and maintain
  • May not catch more sophisticated spam that doesn't use obvious keywords
  • Like reCAPTCHA, it won't stop spam if bots are submitting directly to your form handler URL

Implementing JavaScript form validation in Webflow

Follow these steps to set up custom form validation:

Prepare your form:

  1. Open your Webflow project and navigate to the page with your form.
  2. Add a unique ID to the form submit button you want to validate. For this example, we will use the ID "validationScriptButton".
Avoid spam in Webflow forms using JavaScript validation - Add JS ID

Add the JavaScript:

  1. Go to your Page settings in Webflow.
  2. Navigate to the "Custom Code" section.
  3. In the "Before </body> tag" area, paste the following JavaScript code:
// Simple Form Validation by BRIX Agency
<script>
  // List of banned words (customize this list as needed)
  const bannedWords = ['casino', 'gambling', 'free money', 'adult content'];

  // Function to check for banned words
  function checkForBannedWords(text) {
    return bannedWords.some(word => text.toLowerCase().includes(word.toLowerCase()));
  }

  // Function to validate the form
  function validateForm() {
    const form = document.querySelector('form');
    const submitButton = document.getElementById('validationScriptButton');
    const inputFields = form.querySelectorAll('input[type="text"], input[type="email"], textarea');

    function checkAllFields() {
      const hasSpam = Array.from(inputFields).some(field => checkForBannedWords(field.value));
      submitButton.disabled = hasSpam;
      submitButton.style.opacity = hasSpam ? '0.5' : '1';
    }

    // Add event listeners to all relevant input fields
    inputFields.forEach(field => {
      field.addEventListener('input', checkAllFields);
    });

    // Initial check when the page loads
    checkAllFields();
  }

  // Run the validation when the page loads
  document.addEventListener('DOMContentLoaded', validateForm);
</script>

Customize the Banned Words List:

  1. In the script above, locate the bannedWords array.
  2. Add or remove words and phrases based on the type of spam you're receiving.
  3. Remember to keep the words in lowercase for case-insensitive matching.

Publish your site:

After adding the custom code, publish your Webflow site for the changes to take effect.

In case you are not super familiar with JavaScript, here is a quick overview of what the code does:

  • Defines a list of banned words.
  • Creates a function to check if any of these words appear in the form inputs.
  • Adds an event listener to the specified form (with ID "validationScriptButton").
  • If a banned word is detected, the submit button (with ID "validationScriptButton") is disabled and its opacity is reduced.
  • If no banned words are found, the submit button remains active.

That being said, there are some important considerations to keep in mind if you are going to implement this solution to prevent spam in your Webflow forms:

  • Regularly update your list of banned words based on the type of spam you're receiving.
  • Be very cautious not to add common words that might appear in legitimate messages.
  • Consider combining this method with other spam prevention techniques for better results.

Need more advanced form validation? At BRIX Agency, we offer a powerful Form Validators utility for Webflow. Contact us to enhance your site's security and improve submission quality.

As a final note, if you add this validation method but continue to receive spam form submissions with any of your banned keywords, that means your form handler URL has likely been compromised. In this scenario, bots are bypassing your website's form entirely and submitting data directly to the form's endpoint. This indicates that you'll need to implement server-side spam protection measures, which we will explain starting with Method 3.

Method 3: Form submission validation through Gmail

Gmail's powerful filtering capabilities offer an excellent solution for combating form spam in Webflow. Since Webflow sends all form submissions to your designated email address, you can set up custom filters to catch unwanted content. This server-side method is particularly effective, as it works even when bots bypass your website's form and submit directly to the form handler URL.

Avoid spam in Webflow forms using Gmail filters

Gmail allows you to create custom filters that automatically sort, label, or even delete incoming emails based on specific criteria. By setting up filters for common spam keywords or patterns, you can ensure that unwanted form submissions are automatically marked as spam or moved to a separate folder.

Pros and cons of Gmail filtering

Pros:

  • Works at the email/server level, catching spam that bypasses front-end measures
  • Highly customizable and easy to update
  • No additional cost if you're already using Gmail
  • Can catch a wide variety of spam types

Cons:

  • Requires ongoing maintenance to stay effective against evolving spam tactics
  • Risk of false positives if filters are too aggressive

Setting up Gmail filters for spam prevention

Follow these steps to create effective Gmail filters for your form submissions:

Access Gmail Settings:

  1. Open your Gmail account.
  2. Click the gear icon in the top right corner.
  3. Select "See all settings" from the dropdown menu.

Navigate to Filters and Blocked Addresses:

  1. In the settings menu, click on the "Filters and Blocked Addresses" tab.

Create a new filter:

  1. Scroll to the bottom of the page and click "Create a new filter".

Define filter criteria:

  1. In the "From" field, enter no-reply@webforms.io so this filter only applies to emails coming from Webflow.
  2. In the "Has the words" field, enter spam keywords commonly found in your form submissions, for example ("casino" OR "gambling" OR "free money")
  3. If you're more tech savvy, you can even take advantage of Gmail's support for regular expressions to filter more complex spam patterns.
Avoid spam in Webflow forms using Gmail filters - Create email filters

Choose filter actions:

  1. Click "Create filter".
  2. Check the box next to "Mark as spam".
  3. Optionally, you can also choose to "Delete it" if you're confident in your filter's accuracy.
  4. Click "Create filter" to finalize.
Avoid spam in Webflow forms using Gmail filters - Categorize SPAM messages

Test and refine:

  1. Submit test forms with spam banned words to ensure your filter is working.
  2. Regularly review your spam folder to catch any false positives and refine your filter as needed.

As a final note, it's important to mention that Gmail is not the only email service that supports email filters — Many more do, so feel free to experiment if you're using a different email platform like Outlook.

Method 4: Third-party form validator with Zapier and OOPSpam

For a more robust and automated approach to spam prevention, you can integrate your Webflow forms with Zapier and OOPSpam. This method provides advanced spam detection capabilities without requiring extensive technical knowledge.

Avoid spam in Webflow forms using Zapier and OOPSpam

It's important to note that this method comes with additional expenses. Zapier's service starts at $29 per month when billed monthly, or $19.99 per month if billed annually. OOPSpam's pricing begins at $49 per month for monthly billing, or $40 per month when billed annually. This means implementing this advanced solution will cost you a minimum of about $50 per month.

While this represents a significant investment compared to the free methods we've discussed, it may be worthwhile for websites dealing with high volumes of sophisticated spam or those requiring more automated and robust spam prevention.

Pros and cons of Zapier and OOPSpam integration

Pros:

  • Highly effective at catching sophisticated spam
  • Automated process that saves time in manual review
  • Customizable and adaptable to your specific spam patterns
  • Works even if bots are bypassing your form and submitting directly to the form handler

Cons:

  • Requires paid subscriptions to both Zapier and OOPSpam for full functionality

How Zapier and OOPSpam integration works

  1. Zapier acts as a bridge between your Webflow forms and the OOPSpam service.
  2. When a form is submitted, Zapier sends the data to OOPSpam for analysis.
  3. OOPSpam uses machine learning algorithms to determine if the submission is likely to be spam.
  4. Based on the OOPSpam score, Zapier can then decide whether to forward the submission to your email or discard it.

Setting up Zapier and OOPSpam integration

Follow these steps to implement this advanced spam filtering method:

Set up a Zapier account:

  1. Go to Zapier.com and sign up for an account if you don't have one.
  2. Choose a plan that suits your needs.

Create an OOPSpam account:

  1. Visit OOPSpam.com and sign up for an account.
  2. Once registered, locate your API key in the dashboard.

Create a new Zap in Zapier:

  1. In your Zapier dashboard, click "Create Zap".
  2. Choose Webflow as your trigger app.
  3. Select "New Form Submission" as the trigger event.

If you prefer, you can also get started with the Webflow + OOPSpam Zap template to skip some of the following steps.

Avoid spam in Webflow forms using Zapier and OOPSpam - Configure Zap

Connect your Webflow account:

  1. Follow the prompts to connect your Webflow account to Zapier.
  2. Select the specific website and form you want to monitor.

Add OOPSpam as an action step:

  1. Click "Add a Step" and search for "OOPSpam".
  2. Choose "Check for Spam" as the action.
  3. Connect your OOPSpam account using your API key.

Configure OOPSpam check:

  1. Map the form fields from Webflow to the corresponding OOPSpam fields.
  2. Typically, you'll want to check the email address, form message, and possibly the name fields.

Add a filter step:

  1. After the OOPSpam check, add a filter step.
  2. Set up the filter to continue only if the OOPSpam score is below a certain threshold (e.g., less than 3).

Add the final action:

  1. If the submission passes the filter, add an action to send an email or store the data as desired in your preferred CRM (HubSpot, Salesforce, etc)
  2. You can use Gmail, your CRM, or any other Zapier-supported app for this step.

Test and activate your zap:

  1. Use Zapier's testing features to ensure each step is working correctly.
  2. Submit test forms with both valid and spam-like content to verify the filtering.
  3. Once you're satisfied with the testing, turn on your Zap to start filtering live form submissions.

It's important to note that OOPSpam has a number of settings that you can change to make spam detection even better. Take advantage of all of their features to tailor the spam detection to your specific needs and preferences:

  • Spam Score Threshold: Adjust this based on how strict you want the filtering to be.
  • Language Detection: Set allowed languages to catch spam in foreign languages.
  • Country Blocking: Optionally block submissions from specific countries known for spam.
  • Custom Blacklists: Add your own list of banned words or phrases.

By implementing this method, you're creating a powerful, multi-layered defense against form spam. The combination of Zapier's automation capabilities and OOPSpam's advanced detection algorithms provides a robust solution that can adapt to evolving spam tactics.

Method 5: Switching to advanced third-party form handlers

For those seeking a comprehensive solution that combines form management with sophisticated spam prevention, switching to a third-party form handler can be an excellent option.

Avoid spam in Webflow forms using form handlers

Third-party form handlers typically provide a streamlined workflow: they receive form submissions from your Webflow site, apply various spam detection techniques, and then forward legitimate submissions to your specified endpoints (such as email or a CRM).

This approach offloads the complexities of form processing and spam prevention to specialized services, potentially simplifying your workflow and improving overall security.

Some popular third-party form handlers that offer advanced spam prevention features include:

  • FormSpark: Offers easy integration with Webflow and includes hCaptcha for spam protection.
  • Formspree: Provides built-in spam filtering and bot detection.
  • Basin: Offers simple setup with reCAPTCHA integration.
  • JotForm: Provides advanced form building and spam protection features.

For businesses already using comprehensive marketing or CRM platforms, consider leveraging their built-in form handling capabilities:

  • HubSpot Forms: Part of HubSpot's marketing suite, offering form management with spam protection.
  • Salesforce Pardot: Provides form handling with advanced lead management and spam filtering.

When choosing a third-party form handler, consider factors such as ease of integration with Webflow, the level of spam protection offered, additional features like data management or CRM integration, and of course, pricing.

If you're already using a specific CRM or platform and would like assistance integrating it with your Webflow forms for enhanced spam protection, our team is here to help. We have experience with various integrations and can tailor a solution to your specific needs.

Choosing the right form spam prevention method for your Webflow site

As we've explored in this comprehensive guide, there are multiple approaches to combating spam in Webflow submission forms, each with its own strengths and considerations. Let's recap the methods we've covered:

  1. Implementing reCAPTCHA: A free, easy-to-implement solution that works well for many sites.
  2. Form validation using JavaScript: A customizable approach that allows you to filter based on specific keywords.
  3. Form submission validation through Gmail: Leverages Gmail's powerful filtering capabilities for blocking form submissions matching certain criteria.
  4. Third-party form validator with Zapier and OOPSpam: A robust, automated solution for advanced spam detection.
  5. Using alternative form handlers: Services that offer robust form handling capabilities along with built-in spam prevention measures.

It's worth noting that combining multiple methods can create a more robust defense against spam. For example, you might use reCAPTCHA on your forms, JavaScript validation for quick filtering, and Gmail filters as a final line of defense. Remember, the fight against spam is an ongoing process. Regularly review your spam prevention measures, analyze their effectiveness, and be prepared to adjust your approach as spammers evolve their tactics.

If you continue to face challenges with spam or need assistance implementing these solutions, don't hesitate to get in touch with our Webflow agency — Our team of Webflow Experts has a track record of fixing dozens of form-spam related issues in Webflow, and will be happy to help you out as well!

BRIX Agency Logo
BRIX Agency

We create amazing websites for world-class tech companies.

Join the conversation