Setting up the Moderation Add-On

Introduction

The official Gravity Forms Moderation Add-On utilizes the power of the Perspective API, provided by Jigsaw and Google, in order to use its machine learning algorithms to analyze your form submissions, and trap and filter undesirable language and inputs.

Note that this add-on requires Gravity Forms 2.7 or later. For a complete description of what this add-on does, and the requirements required to install it, refer to this article Using the Moderation Add-On.

Settings

For a full list of all the Moderation Add-On settings, refer to this guide.

Setup Processes

This guide covers the following setup processes.

  1. Getting your Perspective API Key.
  2. Adding your key.
  3. Setting a score threshold.
  4. Setting the attributes to filter.
  5. Setting the action for toxic entries

Getting Your Keys

This step requires completing a Google approval process which can take up to 24 hours. Full instructions and a video walkthrough are available on the Perspective Developer site.

  1. Sign in with your Google account.
  2. On the Console page, either:
  • Click “Create Project” 
  • Click the “Select a Project” dropdown. In the popup that appears, click “New Project”.
  1. Name the project.
  2. Click the “Create” button. The project will now appear in the dropdown.
  3. Request API Access

Google requires Perspective API users to register for access so that they can better understand and serve you. Once you have a Google Cloud account and project set up, please fill out this form to gain access to the API.

Adding Your Keys

To validate the communication between your site and the Perspective API service, you will need to provide Gravity Forms with this unique key.

  1. Log into your WordPress admin dashboard.
  2. On the left side navigation menu, hover over Forms and click on Settings.
  3. From this page, click the Moderation tab.
  4. Enter your Perspective API Key. This is obtained from the Perspective API website.
  5. Click Update Settings. If you’ve entered your API key correctly, you will be notified by a green check mark beside the box. If you do not see green check marks next to the API Key, please double-check this information and try again.

Adding Default Settings

  1. Toxicity Score: Enter the threshold value you wish. The higher the score (from 0 to 1) returned from the Perspective API, the more likely it reflects a toxic interaction.
  2. Attributes to Filter: Select any of the filter types that fit your needs. Not all languages support all Filter types. Results are displayed dynamically based on the language selected.
  3. Custom Toxicity Words: Enter any specific words that will automatically mark an entry as toxic. This setting is optional.
  4. Actions: Select what you’d like to happen when entries are marked toxic.

Moderation Add-On Hooks

The Moderation Add-On provides hooks that can be used to modify the default functionality or extend it.

gform_moderation_locale