Skip to content

managingwp/gf-domain-restriction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

GF Domain Restriction

A WordPress plugin to restrict Gravity Forms submissions by email domain.

Features

  • Whitelist domains that are always allowed
  • Blacklist domains that are always blocked
  • Pending approval queue for unknown domains — you get an email notification and can approve/deny from the admin
  • Whitelist-only mode — block all domains not explicitly whitelisted (no approval requests)
  • Apply restrictions to a specific form or all forms
  • Custom error messages for blocked and pending submissions

Installation

  1. Upload the gf-domain-restriction folder to /wp-content/plugins/
  2. Activate the plugin in Plugins → Installed Plugins
  3. Go to Settings → GF Domain Restriction to configure

Configuration

Setting Description
Form ID The ID of the form to restrict. Leave blank for all forms.
Email Field ID The field ID of the email field in your form.
Notification Email Where to send approval request emails.
Whitelist-Only Mode Block all non-whitelisted domains without sending approval requests.
Whitelisted Domains One domain per line — always allowed.
Blacklisted Domains One domain per line — always blocked.
Blocked Message Inline error shown when a blacklisted domain is used.
Pending Message Inline error shown when an unknown domain submits.

How It Works

  1. User submits a form with their email address
  2. Plugin extracts the domain (e.g. gmail.com from user@gmail.com)
  3. If domain is whitelisted → submission allowed ✅
  4. If domain is blacklisted → submission blocked with error ❌
  5. If domain is unknown → submission blocked, domain queued for review, admin notified via email 📧
  6. Admin visits Settings → GF Domain Restriction to approve, deny, or dismiss pending domains
  7. Approving adds the domain to the whitelist; denying adds it to the blacklist

Requirements

  • WordPress 5.8+
  • Gravity Forms (any recent version)
  • PHP 7.4+

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors