Block Specific Words from Your Wix Form Submissions
- Robert Hebert
- Aug 20, 2024
- 3 min read

With the rollout of Wix's latest Editor, Wix Studio, Wix also rolled out a new version of their form system called Wix Forms (with the previous version still existing under the name Old Forms).
In this article, we will show you how to prevent certain words or phrases from being submitted through forms on a Wix website. This could be useful for various reasons, such as preventing spam, filtering out inappropriate language, or restricting specific terms that may not be relevant or allowed in the context of the form. By blocking specific words, website administrators can maintain the quality and relevance of the data collected, ensuring that submissions align with the intended purpose of the form.
Preventing spam submissions can usually be accomplished by adding a reCaptcha field but sometimes, spam submissions still get through, often times repeating the same content and flooding your email.
While there is not anything you can currently do to prevent the spam submissions, it is possible to prevent the submissions from reaching your inbox. This is done by editing the Wix Automation that is automatically created when you create a new Wix Form.
You can access this feature from the Dashboard by clicking the Automations menu item on the Side Menu. From here you should see an automation that says "New Submission received for" followed by the name of the form you're trying to affect. Click the three dots on the farthest right column and click Edit from the menu that appears.
From the edit screen, in between the Trigger and Action 1 Blocks, you should see "Add Condition". Click this and select the field you want to monitor for spam words from the dropdown under "Continue the automation if", and in the dropdown that appears to the right, select Text > doesn't contain, and then in the text field that appears to the right, enter the first word you would like to prevent from appearing in the submissions you receive emails for.
To add another word/phrase you want to filter by, click the "Add Criteria" button below the condition you just added, and above the Select criteria dropdown that appears make sure it says And instead of Or (if it says Or click that and change it to And from the dropdown). Here you can once again select the field you want to filter, select "doesn't contain" in the next dropdown, and then enter the word/phrase you want to prevent in the text field.
Repeat this as many times as needed and you can prevent these spam submissions from reaching your inbox!
Now if you're using Old Forms, you can pretty much copy and paste the provided code snippet into your page code, replace the "ID_OF_YOUR_OLD_FORM_ELEMENT" with the ID of your form and change the words in the PROHIBITED_WORDS variable to whatever words/phrases you are trying to filter as long as the words are surrounded by double quotes and separated by commas (i.e. ["word", "other word"])

This code checks every field for the values set up in the PROHIBITED_WORDS variable and if it finds any of them, it actually stops the form from being submitted!
Check out the code we used below:
const PROHIBITED_WORDS = ["spam", ".com", ".net", "profanity"];
const validate = (event) => event.fields.every(field => PROHIBITED_WORDS.every(word => field.fieldValue.includes(word) === false))
$w.onReady(function() {
$w("#ID_OF_YOUR_OLD_FORM_ELEMENT").onWixFormSubmit(event => validate(event));
});
About our company
RHM specializes in helping businesses of all sizes and across all industries achieve their digital and web marketing needs. Whether you are designing a new website, building an app, performing custom development, or running Google Ads, our goal is to showcase how you are the best at what you do and help people connect with you. Contact us at 225-250-1888 to get started!
Shiksha
ExamsWallah
Nice blog and absolutely outstanding. You can do something much better but i still say this perfect. Keep trying for the best. Escorts in Dubai
If you're studying in New Zealand and looking for reliable Assignment help, AssignmentHelpPro is the perfect solution! Their top ph.d. expert offers well-researched, original, and properly formatted assignments across various subjects. The writers are experienced, and the service is affordable and always on time. Whether it's essays, case studies, or dissertations, they really make academic life easier. Highly recommended for students who want to boost their grades without stress!
Nice blog and absolutely outstanding. You can do something much better but i still say this perfect. Keep trying for the best. Dubai Independent Escort
Gracias por el gran artículo! Descubre lo último en estilo y comodidad con nuestra Kanye West Sudadera. Perfecto para cualquier salida informal. Compra ahora y mejora tu guardarropa