-
- Managing Form Submissions
- Searching and Filtering Submissions
- Submission Tracking Data
- Customizing Submission Columns
- Editing Submissions
- Deleting Submissions
- Importing Submissions
- Exporting Submissions
- Exporting Submissions with a Webhook URL
- Tracking the User's IP Address
- Disable Submission Storage
- Auto-Delete Old Submissions
- Auto-Save Each Submission to a JSON file
- Increment a Count on Each Submission
- Add a Unique ID to Each Submission
-
- Set up Auto-Responder Emails
- Email the Person Who Filled Out the Form
- Send an Email Only When a Checkbox Is Checked
- Attach the Submission PDF to Emails
- Send Email Based on Drop Down Selection
- Send Different Email Content Based on Form Responses
- Styling Emails with CSS
- Sending Plain-Text Alternative Body Emails
- Troubleshooting Email Delivery
- Tracking Sent Emails
- Resending Emails
-
- Browser Autocomplete for Form Fields
- Redirect to a Menu Item After Form Submission
- Show a Form Only to Logged-In Users
- Adding an “Other” Option
- Show or Hide Form Fields Based on User Joomla User Group
- Scroll the Page to the Top When a Long Form is Submitted
- Display Submissions Count for a Specific Form
- Populate Drop Down, Radio Buttons or Checkboxes with a CSV File
- Silently POST Submitted Data to Any API or URL
- Create a Custom Login Form
- Auto-Populate Fields with Article Data
- Add a placeholder text to a Dropdown field
- Create Multilingual Forms in Joomla
- Redirect User to a URL After Form Submission
- Importing and Exporting Forms
- Display Convert Forms in a popup
-
- Minimum Time to Submit
- Restrict Form Submissions Based on IP
- Enforcing a Custom Password Policy in Convert Forms
- Add Cloudflare Turnstile to your Joomla Form
- Implement the Iubenda Consent Database in Joomla with Convert Forms
- Add Custom Validations to Fields and Forms
- Add Math Captcha to your Form
- Prevent a Field From Saving in the Database
- Add hCaptcha to your Form
- Enable Double Opt-in
- Allow Form Submissions in Specific Date Range
- Ensure a Unique Value is Entered Into a Field
- Block Form Submissions Containing Profanity (Bad Words)
- Block Email Addresses or Email Domains
- Honeypot
- Setting Up Google reCAPTCHA
- Create GDPR Compliant Forms
Block Form Submissions Containing Profanity (Bad Words)
Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Would you like to block specific words from being submitted into your form? This is quite useful if you have a list of bad words you would like to filter out. The following PHP snippet will provide a helpful message to your users when they submit the form and any of your listed words appears in their submission.
Setup
To detect bad words and notify the user with a helpful message, copy the code shown below and place it into the PHP Scripts → Form Process area of your form.
// The list of not allowed words
$not_allowed_words = [
'dog',
'cat',
'elephant'
];
// The Field Name where search will be performed against the not allowed words
$field_name = 'text';
// The helpful message that will appear if bad words are found
$error_message = 'Your text contains words that are not allowed.';
// Do not edit below
foreach($not_allowed_words as $word)
{
if (stripos($post[$field_name], $word) !== false)
{
throw new Exception($error_message);
}
}
What do I need to edit in the above code?
Remember to update following parts:
- The $not_allowed_words array with the words you would like to prevent from being submitted.
- The $field_name with your input's Field Name.
- The $error_message with the error message you'd like to display to your users when they enter bad words.
Last updated on Mar 5th 2026 14:03