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!
I’m always impressed by how practical and actionable your advice is. This post was another fantastic example of content that’s easy to understand and apply. Thank you for sharing your knowledge so generously. Keep up the amazing work—you’re truly inspiring!
Mostbet, grundat 2009, har vuxit till ett omfattande ekosystem för sport- och spelälskare. I Sverige har plattformen gjort sig ett namn med sina konkurrenskraftiga odds och ett brett utbud, särskilt inom populära sporter som hockey, fotboll och längdskidåkning. Det är en plats där spänningen och variationen är i fokus.
Med en Curacao-licens garanteras spelare en hög säkerhetsnivå, en internationell standard som attraherar många https://mostbet-sweden.net/ Även om det inte är en svensk licens, uppskattas just den internationella aspekten av många spelare för de möjligheter den ger till att utforska ett bredare utbud av evenemang. Webbplatsens gränssnitt, trots att den saknar svensk översättning, är intuitivt och lätt att navigera, vilket gör det tillgängligt för en bred användarbas.
Struggling with assignments? Here’s some advice! Always start early, break tasks into smaller steps, and review instructions carefully. Need extra support? Don’t hesitate to seek help with assignment challenges to boost understanding and performance
Celebrity and influencer content provides a glimpse into glamorous lifestyles, collaborations, and https://rockonav.com/ behind-the-scenes moments. Fans connect with their favorite personalities through this category.
Calm gummies are a convenient way to help reduce stress and promote relaxation. Made with natural roadtrip mushroom gummies ingredients like magnesium or CBD, they are designed to support a sense of calm without the need for harsh medications. These gummies are often used as a daily supplement for wellness.