BrightLeaf Digital Code Snippet Library

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





Like our snippets? You'll 💜 GravityOps!

This code snippet ensures that child form submissions in Gravity Forms do not exceed the available balance recorded in a GravityView ledger. It validates disbursal requests against the user's balance, preventing over-allocation of funds across multiple pending and approved submissions. Each array at the top of the snippet is for a different form with it's own ledger. You can use

This code snippet ensures that a single form submission in Gravity Forms does not exceed the available balance recorded in a GravityView ledger. It validates the requested amount against the user's balance and any pending disbursals, preventing over-allocation of funds. The array at the top of the snippet is for a one form. You can use this snippet for as

GOAL Use the simple shortcode [export_filtered_entries] to render a button that triggers a CSV download of the entire GravityView dataset matching the current filters/search. REQUIREMENTS GravityView and Gravity Forms active. The shortcode should be used on a page where a GravityView is present, or provide view_id/form_id via attributes. IMPORTANT For filtered exports, the shortcode MUST be placed on the same page

GOAL This code snippet renames the "Workflow Complete" step in Gravity Flow by dynamically replacing it with the actual name of the last completed step in the workflow. This ensures that users see a meaningful step name rather than the generic "Workflow Complete" label when viewing GravityView entries. CONFIGURATION $form_ids: Update to the list of form IDs this should apply to. NOTES

This code snippet enhances Gravity Flow by allowing workflows to be delayed or restarted based on GravityView approval and subscription payments. It provides options to: Delay workflow initiation until an entry is approved in GravityView instead of starting upon form submission. Restart the workflow upon each subscription payment for recurring payment scenarios. Update a date field when the workflow restarts to reflect the latest payment or approval. Manually