Random Text Detection helps prevent automated form submissions containing randomly generated text or suspicious Gmail addresses. This type of spam often uses long strings of mixed uppercase and lowercase letters in name and message fields, making submissions difficult to identify using traditional keyword-based spam filtering.
WS Form automatically checks submitted field values for these patterns and flags matching submissions as spam. This feature is available in both WS Form and WS Form PRO and can be enabled individually for each form.
Enabling Random Text Spam Protection
To enable Random Text spam protection on a form:
- Open the form in the WS Form layout editor.
- Click the Settings icon at the top of the layout editor.
- Click the Spam Protection tab.
- Scroll down to the Random Text Detection section.
- Check Enable.
- Click Save & Close to save your changes.
Random Text spam protection is now enabled for the form. No additional configuration or third-party services are required.
How Random Text Spam Protection Works
When a form is submitted, WS Form analyzes supported field values for patterns commonly associated with automated spam submissions.
Two types of suspicious content are detected:
Randomly Generated Text
Spam bots frequently populate form fields with randomly generated sequences of uppercase and lowercase letters instead of meaningful names or messages.
For example, a spam submission might contain the following:
First Name: kFaUShXPAdhzUyKbS
Last Name: VyDOAywSyJwoCHWu
Message: XOXDuZEUqsRJTWNnfHH
WS Form detects long strings of mixed-case letters that contain no spaces, numbers, or punctuation. This check is designed to identify randomly generated content rather than ordinary names, sentences, or messages.
For example, a name such as John Smith or a message such as Please contact me about your services will not match this pattern.
Suspicious Gmail Addresses
Some spam bots generate Gmail addresses containing an unusually large number of periods before the @ symbol.
For example:
da.v.a.t.o.hi.k.92.3@gmail.com
Gmail ignores periods in the username portion of standard Gmail addresses. This allows spammers to create multiple variations of the same email address that all deliver messages to the same inbox.
WS Form detects suspicious patterns involving excessive periods in addresses using the @gmail.com or @googlemail.com domains.
Normal Gmail addresses containing periods, such as john.smith@gmail.com, are not flagged by this pattern.
Which Fields Are Checked?
Random Text spam protection automatically checks the following field types:
- Text: Checks for randomly generated mixed-case text and suspicious Gmail addresses.
- Text Area: Checks for randomly generated mixed-case text and suspicious Gmail addresses.
- Email: Checks for suspicious Gmail addresses containing excessive periods.
Password and hidden fields are excluded from these checks.
Values containing ordinary words, spaces, numbers, or punctuation will not match the randomly generated text pattern. Email addresses are evaluated separately using the Gmail-specific check.
What Happens When Spam Is Detected?
If Random Text spam protection detects a matching field value, WS Form assigns the submission a spam score of 100.
This score is compared against the Spam Threshold setting, found under Settings > Spam in the form layout editor.
The default Spam Threshold is 50. Therefore, a submission with a spam score of 100 will automatically be classified as spam and moved to the submissions spam folder.
When a submission is identified as spam:
- The submission is saved if the Database action is enabled.
- Other actions and integrations, including email notifications, are not executed.
- The website visitor receives the normal form submission success message.
- A system note is added to the submission indicating that it was flagged as random text spam.
This approach helps prevent spam notifications and unwanted integration activity without revealing to spam bots that their submissions have been detected.
False Positives
Random Text spam protection is designed to recognize specific patterns commonly associated with automated submissions. However, a legitimate field value consisting entirely of a long, mixed-case sequence of letters could also match.
For example, a form that collects randomly generated access codes or license keys might contain values that resemble spam.
If your form is intended to collect this type of information, consider disabling Random Text spam protection for that form.
If a legitimate submission has already been flagged as spam, open the submission in WS Form and click Not Spam to restore it.
Developer Customization
Developers can customize Random Text spam detection using the wsf_submit_block_random_text WordPress filter hook.
This filter runs for each supported field when Random Text spam protection is enabled. It allows developers to override the default detection result or implement additional checks.
Additional Spam Protection
Random Text spam protection can be used alongside other WS Form spam prevention features, including honeypot protection, keyword blocklists, CAPTCHA services, and IP reputation checks.
For more information, see our Spam Protection knowledge base article.
Keywords: gibberish, random string, form fuzzing