Part of the Webform ecosystem · 217 projects
This module prevents known spammers from submitting your webforms by maintaining a central block list of email addresses. You can add this functionality to specific webforms, and submissions with blocked addresses will be rejected with a custom error message.
Webform Email Blocker stops known bad actors from submitting your webforms. You keep one site-wide list of blocked email addresses, then add the Webform Email Blocker handler to any webform you want to protect. If someone submits a form with a listed address, the submission is rejected and they see an error message you write.
Use it to keep out repeat spammers, abusive users or test accounts you can't otherwise filter, without writing custom validation code for each form.
Features
- One central block list. Manage every blocked address in one place and use it on as many webforms as you need.
- Turn it on per form. Add the handler only to the webforms that need it, and choose which email element each form checks.
- Case-insensitive matching.
[email protected]and[email protected]count as the same address. - Flexible list format. Separate addresses with commas, new lines or both. Extra whitespace is ignored.
- Your own error message. Set the message shown on the email field when a submission is blocked.
- Separate permission. Block list access uses its own Administer Webform Email Blocker permission, so you can hand it off without giving out broader site admin rights.
- Exportable configuration. All settings are stored in config and can be deployed with configuration management.
Post-installation
- Go to Configuration » System » Webform Email Blocker (
/admin/config/system/webform_email_blocker). - Enter the email addresses to block, separated by commas or new lines, and set the error message.
- Edit a webform, go to Settings » Emails / Handlers, and add the Webform Email Blocker handler.
- Enter the machine name of the email element to check (for example,
email).
Repeat steps 3 and 4 for each webform you want to protect.
Note: Only full addresses are matched exactly. Domain blocking and wildcard patterns are not supported, so [email protected] will not block [email protected].
Requirements
- Drupal 10.3, 11 or 12
- Webform 6.2 or higher
Installation
Install with Composer:
composer require drupal/webform_email_blockerThen enable the module as usual. See Installing Drupal modules for more information.
Supporting this module
Bug reports, feature requests and patches are welcome in the issue queue.
Ask your assistant about Webform Email Blocker
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Webform ecosystem
Most installed first