Troubleshooting Fluent Forms Keyword Restrictions: Why Phrases Don't Save or Work
Content
Many Fluent Forms users implement keyword-based restrictions to prevent spam submissions, but encounter a frustrating issue: the restriction settings don't save properly or fail to block submissions containing restricted phrases. This guide explains why this happens and provides working solutions.
Common Symptoms of Keyword Restriction Issues
Based on community reports, these are the most common problems users experience:
- Keywords or phrases appear to save but disappear when returning to settings
- Forms block all submissions regardless of content
- Restrictions only work with single words, not multi-word phrases
- Forms fail to block submissions containing restricted keywords
Why Keyword Restrictions Might Fail
Several factors can cause keyword restriction issues in Fluent Forms:
1. Phrase Formatting Problems
The native keyword restriction feature may not properly handle multi-word phrases separated by commas. When users enter phrases like "this is a phrase, and this is another phrase," the system might interpret this as multiple individual words rather than distinct phrases.
2. Validation Method Limitations
As mentioned in Thread 3, the default "contains" matching method may not work optimally for phrases. It looks for keyword occurrences anywhere in the text, which can cause false positives or fail to detect properly formatted phrases.
3. Cache and Browser Compatibility Issues
As noted in Thread 6, caching mechanisms—either in WordPress, your browser, or server-side—might prevent settings from saving correctly or functioning immediately after configuration.
Working Solutions for Keyword and Phrase Restrictions
Solution 1: Use Advanced Form Validation with Regex
For more reliable phrase matching, use Fluent Forms' Advanced Form Validation feature with regular expressions:
- Edit your form and navigate to Settings → Advanced Form Validation
- Add a new validation rule
- For the field you want to validate, select "Matches Pattern"
- Use regex patterns like
b[Pp][Hh][Rr][Aa][Ss][Ee]bto match whole words only - Set your custom error message for when the pattern is matched
Solution 2: Clear Caches Thoroughly
If your restriction settings aren't saving:
- Clear your browser cache completely
- Clear any WordPress caching plugins (WP Rocket, W3 Total Cache, etc.)
- Clear server-side caching if applicable
- Test in a different browser or incognito mode
Solution 3: Test with Simple Keywords First
Before implementing complex phrases:
- Test with a single keyword to ensure the basic functionality works
- Gradually add more complex phrases one at a time
- Check if the settings persist after saving and refreshing
Solution 4: Export and Import for Testing
As suggested in Thread 1, exporting your form and testing it on a clean WordPress installation can help identify if the issue is specific to your environment.
When to Consider Alternative Approaches
If keyword restrictions continue to be unreliable for your needs:
- Use email domain restrictions instead (as mentioned in Threads 7 and 11)
- Implement custom validation using PHP snippets
- Combine Fluent Forms with spam prevention plugins
- Use CAPTCHA solutions as an additional layer of protection
While the Fluent Forms team continues to improve the plugin's built-in restrictions, these troubleshooting steps should help you implement more reliable content filtering for your forms.
Related Support Threads Support
-
phrase based submission restrictionhttps://wordpress.org/support/topic/phrase-based-submission-restriction/
-
Proposal to add Prosopo as a captcha vendor optionhttps://wordpress.org/support/topic/proposal-to-add-prosopo-as-a-captcha-vendor-option-6/
-
Word Blocking Requestshttps://wordpress.org/support/topic/word-blocking-requests/
-
Restricting form access to multiple roleshttps://wordpress.org/support/topic/restricting-form-access-to-multiple-roles/
-
Show user limited submissionshttps://wordpress.org/support/topic/show-user-limited-submissions/
-
Restricted Keywords Not Savinghttps://wordpress.org/support/topic/restricted-keywords-not-saving/
-
How to accept only Business Email?https://wordpress.org/support/topic/how-to-accept-only-business-email/
-
Feature Request: option to disable stylinghttps://wordpress.org/support/topic/feature-request-option-to-disable-styling/
-
minimum number of wordshttps://wordpress.org/support/topic/minimum-number-of-words/
-
Remember user checkbox selections, and using the password field as a role gate.https://wordpress.org/support/topic/remember-user-checkbox-selections-and-using-the-password-field-as-a-role-gate/
-
Ban specific email address domains in Fluent Formshttps://wordpress.org/support/topic/ban-specific-email-address-domains-in-fluent-forms-form-submission/