BrightLeaf Digital Code Snippet Library

Check out our growing library of code snippets for Gravity Forms!

Send Error Notification When Form(s) Fail Validation

GOAL:

Sends email notification to administrators whenever any form submission fails validation. Captures all failed fields with their labels and error messages, helping identify problematic forms, confusing validation rules, or user experience issues that need attention.

CONFIGURATION:

  1. $to: Add the recipient email address (in between the quotes) where notifications should be sent. Defaults to site admin email.
  2. $whitelist: Choose which forms to monitor - Leave empty [] to monitor ALL forms - Add form IDs like [1, 5, 12] to ONLY monitor those specific forms - Find form IDs in WordPress admin: Forms > Forms (shown in the ID column)
  3. $blacklist: Choose which forms to exclude - Leave empty [] to exclude NO forms - Add form IDs like [3, 7] to SKIP those specific forms - If both whitelist and blacklist are configured, blacklist takes priority
Install Using Code Snippets

This code is best installed directly on your site using the Code Snippets plugin.

Check Out the Code

Loading...

Code Copied!
Stay Updated On This Snippet

This entry has no reviews.