BrightLeaf Digital Code Snippet Library
Check out our growing library of code snippets for Gravity Forms!
Eleven of these snippets register their own shortcodes. Every tag and attribute is in our Gravity Forms shortcodes reference. Need a Gravity Forms or GravityView shortcode built for you? Try the free shortcode builder.
Send Error Notification When Specified Form Field Has 0 value
Goal
Monitors donation/ledger forms for critical fields that have zero or empty values after submission. Sends email alert to administrators when amount fields are empty, which could indicate data loss, calculation errors, or payment processing issues. Includes user info and timestamp for debugging.
Configuration
- Edit the config block below. Installed through GOCSM, these values are fields and survive snippet updates.
$to: Add the recipient email address (in between the quotes) where notifications should be sent. Defaults to site admin email.$form_ids: Configure form IDs and field IDs to monitor. As of now it checks fields 4, 8, and 11 on form 30 and fields 13 and 16 on form 60. Modify the id's to your own forms. Remove or add as necessary.
This code is best installed directly on your site using the Code Snippets plugin.
Loading...
Review this entry
You must be logged in to post a comment.