BrightLeaf Digital Code Snippet Library
Check out our growing library of code snippets for Gravity Forms!
GOAL By default this code snippet automatically converts the value of a specific text field to uppercase before saving the entry in Gravity Forms. It ensures consistency in formatting and is particularly useful for fields like names, codes, or identifiers that require capitalization. Now also allows numerous other text manipulations and transformations: Case transformations: uppercase, lowercase, title case, camelCase, PascalCase, …
This snippet adds a widget to your admin dashboard and embeds your selected form in it. Works well with many add ons such as Nested Forms and Populate Anything and Live Merge Tags. Displays a custom confirmation with a link to the entry (opened in a new tab). Can easily reload the form after submissions. Triggers feeds and notifications and …
Goal Show a simple popup based on three common behaviors: Exit intent (when a desktop user moves the mouse toward the browser’s top bar) Idle time (after a visitor hasn’t moved/typed/scrolled for N seconds) After scrolling a specified amount down the page. Keep everything self‑contained: the shortcode prints its own minimal CSS and JS inline. Work nicely with normal page …
This code snippet adds an "Export Forms as Text" feature to Gravity Forms, allowing administrators to export form structures, confirmations, notifications, and workflow steps as a downloadable text file. This is useful for documentation, backups, or sharing form configurations without requiring JSON exports. Features Adds an Export Forms as Text tab in the Gravity Forms export menu. Allows selection of …
This snippet has been upgraded to a plugin for easier management and additional functionality. The plugin version also allows creating folders for Gravity View's. More features to come. Check it out here! The Form Folders snippet allows admins to organize forms into folders for better management. It provides a user-friendly UI to create, view, rename, and delete folders, …
GFSearch This snippet has been replaced with a plugin version.
GOAL Adds "Export Layout" button to Gravity Forms editor that exports form structure as formatted HTML table to clipboard. Includes field labels, types, conditional logic, and Gravity Populate Anything (GPPA) settings for documentation purposes. USAGE Navigate to Forms > Edit Form in WordPress admin Click "📋 Export Layout" button in toolbar Script copies formatted table to clipboard Opens new Google …
GOAL Prevents duplicate submissions when a specific combination of fields (Name, Number, Date) matches an existing active entry. If a duplicate is found, shows custom messages on the relevant fields. CONFIGURATION $forms: Add your form ID as a key, and set the field IDs to check. Then set the corresponding error messages. Optionally set the window_days key to limit check …
GOAL This JavaScript snippet prompts users with a confirmation message before submitting a Gravity Form when they select a specific radio button choice. If the user selects a designated choice, a confirmation dialog appears, requiring them to confirm their selection before the form is submitted. This ensures that users intentionally proceed with their chosen option. Remember to update the choices and messages …
GOAL This code snippet automatically capitalizes the first letter of each word in specified Gravity Forms fields before saving the entry. It ensures that user inputs, such as names or addresses, are stored in proper case formatting, enhancing data consistency and readability. Features Automatically applies proper case (capitalizes the first letter of each word). Works on specified form and field …
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 $to: Add the recipient email address (in between the quotes) where notifications should be sent. Defaults to site admin email. $whitelist: Choose which …
GOAL Alerts administrators when Gravity Forms fails to send email notifications. Critical for ensuring important notifications (confirmations, alerts, assignments) aren't silently lost. Includes full email details and error message to help diagnose SMTP/email configuration issues. DISCLAIMER This snippet only catches notifications that Gravity Forms detected as failed. It does not catch errors that occur during email sending, such as SMTP …
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 $to: Add the recipient email address (in between the quotes) where notifications should be sent. Defaults …
GOAL This snippet ensures that specific groups of fields within a Gravity Forms form do not contain duplicate values. It allows you to define multiple sets of fields for validation, ensuring that no two fields within a group share the same value. If duplicates are found, a custom validation error message is displayed for each affected field. Features ✔ Prevents Duplicate Values – Ensures that no …