Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    • Documentation
    • Support
    • Account

Gravity Forms Blacklist

Validate a field’s value against the WordPress Comment Blacklist validation.

This plugin is part of Gravity Perks, a suite of 32+ essential Gravity Forms addons with support you can count on.

  • View All Perks
  • Buy Gravity Perks
View Demo

What does it do?

This plugin allows you to validate a field’s value against the WordPress Comment Blacklist validation. This option can be set for a single field, multiple fields, all fields within a form. If the field fails validation it will display an error to the end user stating that their field contains blacklisted words.

Features

  • Validate fields against blacklist.
    Prevent form submissions that include blacklisted words.
  • Validate against a single field, multiple fields, or all fields.
    Flexible blacklisting to match your form’s needs.
  • Integrates with the built-in WordPress Comment Blacklist.
    Use the same blacklist for both comments and forms.
  • Reject submissions silently with a honeypot.
    Reject entries without notifying the user that their entry has been blocked.
  • Automatic updates.
    Get updates and the latest features right in your dashboard.
  • Awesome support.
    We’re here to help! And we mean it.

Documentation

  1. How do I enable this functionality?
    1. Single Field
    2. Whole Form
  2. Feature Details
    1. Single Field
    2. Whole Form
    3. WordPress Comment Blacklist
      1. Automate Blacklist Management
    4. Honeypot
  3. Known Limitations
  4. FAQs
    1. How can I change the text of the validation error message?
  5. Hooks

How do I enable this functionality?

Since there are two options for this perk, field and form, we will do them in separate categories.

Single Field

To activate blacklist validation for a single field, navigate to the Perks tab and check Validate Against WordPress “Comment Blacklist”.

field-settings

Whole Form

To validate against every field on the form, navigate to the “Restrictions” section within the form settings area. Check Validate Against WordPress “Comment Blacklist”.

form-settings

Feature Details

Single Field

If a single field has the Blacklist setting enabled then that field will take the end-users submitted value and check it against that of the WordPress Comment Blacklist words.

Whole Form

If the form wide Blacklist setting is enabled then it loops through all fields within the form when an end-user submits the form. It then checks the fields to see if they are supported by this perk. After grabbing a list of all supported fields it then validates the fields against the WordPress Comment Blacklist words.

WordPress Comment Blacklist

To specify blacklisted words, navigate to Settings > Discussion. Scroll down to “Comment Blocklist” and enter any words you wish to prevent from being submitted on this form, one per line.

You can specify IP addresses in the Comment Blocklist and GP Comment Blacklist will prevent submissions from that IP.

comment-blacklist-wp-setting
Automate Blacklist Management

Save yourself time and beef up your blacklist by supplementing the list of keywords with this repository. You can add the list to your site by pasting it into the Comment Blocklist, or you can use any of the supported plugins that automates adding new keywords.

Honeypot

Use the gpb_enable_honeypot hook to silently reject submissions while making it appear successful. This discourages spammers from attempting to find loopholes in your blacklist to exploit.

Known Limitations

Due to the nature of WordPress’ Comment Blacklist feature, it will match words inside of other words. So let’s say you wanted to ban the word Race it would also ban any words with race in it, like Racer.

FAQs

How can I change the text of the validation error message?

You can change the text of the validation error by using the gpb_validation_message hook.

Hooks

  • gpb_enable_honeypot
  • gpb_validation_message
  • gpcb_validate_user_agent
Gravity Forms has hundreds of hooks. Check out our Gravity Forms Hook Reference for the most thorough guide to Gravity Forms’ many actions and filters.

Perk Deets

  • Version 1.2.9
  • Updated September 29, 2020
  • Released January 19, 2013
  • View Changelog

Changelog

1.2.9

  • Fixed an issue where GPBL caused a fatal error when Gravity Forms is deactivated first.
  • Added support for Gravity Forms 2.5.

1.2.8

  • Fixed an issue where specific blacklisted words may fail form submission due to being in the user-agent.
  • Added gpcb_validate_user_agent filter.
  • Fixed issue where the "Blacklist Validation" setting would not show under the "Legacy" section in Gravity Forms 2.5 and newer.

1.2.7

  • Added localization support.
  • Updated plugin author.

1.2.6

  • Fixed issue where field setting was not appearing.
  • Removed old form settings methods.

1.2.5

  • Added the "gpb_validation_message" filter to allow filtering the blacklist validation message. Added the "gpb_honey_pot" filter to bring "gpcb_enable_honeypot" inline with new perk name. Deprecated the "gpcb_enable_honeypot" filter.

1.2.4

  • Updated to extend GP_Plugin.
  • Added missing changelog line for 1.2.3

1.2.3

  • Renamed class-gp-comment-blacklist.php to class-gp-blacklist.php

1.2.2

  • Renamed to GP Blacklist from GP Comment Blacklist.
  • Updated to GP Bootstrap 1.2.
  • Refactoring.

1.2.1

  • Added "gpcb_enable_honeypot" filter; allows for honeypot-enabled submissions if comment blacklist validation returns an error add_filter( "gpcb_enable_honeypot", "__return_true" );

1.2

  • Updated perk to use GP_Bootstrap

1.1

  • Updated to take advantage of UI changes made in GF 1.7

All Perks

  • GF Auto Login
  • GF Better User Activation
  • GF Blacklist
  • GF Conditional Logic Dates
  • GF Conditional Pricing
  • GF Copy Cat
  • GF Date Time Calculator
  • GF Disable Entry Creation
  • GF Easy Passthrough
  • GF eCommerce Fields
  • GF Email Users
  • GF Expand Textareas
  • GF File Upload Pro
  • GF Limit Checkboxes
  • GF Limit Choices
  • GF Limit Dates
  • GF Limit Submissions
  • GF Live Preview
  • GF Media Library
  • GF Multi-Page Navigation
  • GF Nested Forms
  • GF Pay Per Word
  • GF PayPal One-time Fee
  • GF Placeholder
  • GF Populate Anything
  • GF Post Content Merge Tags
  • GF Preview Submission
  • GF Price Range
  • GF Read Only
  • GF Reload Form
  • GF Terms Of Service
  • GF Unique ID
  • GF Word Count

Copyright © 2021 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Gravity Perks
    ▼
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    ▼
    • Documentation
    • Support
    • Account