Global Variables for Gravity Math


or
or

Learn More About This Plugin:

Getting Started

Global Variables for Gravity Math extends the capabilities of the Gravity Math plugin by allowing users to define reusable, global variables through a user-friendly interface. These global variables can then be used in Gravity Forms calculations via merge tags, providing a powerful and flexible system for managing complex calculations across your WordPress site.

On the Global Variables setting page you create the variables. When you hit the button a modal will pop up with a text field for the variable slug-which will be converted into a merge tag- and a text area for the formula.

On this page you can create new variables and edit and delete existing ones. You can easily copy the slugs by pressing the copy button next to each row.

You can nest variables inside each other and if you will be using the variable in a Gravity View you can use merge tags as well.

The variable can be used anywhere there is merge tag support just by using the slug.

If you are using the variable on a page or post or somewhere without merge tag support just wrap it in the shortcode tag. This will work for Gravity Math shortcodes and our GFSearch shortcodes. Otherwise you need to integrate the shortcode with the plugin. If you are the shortcode developer add these lines to the top of the function processing the shortcode, otherwise contact the developer to get it added:

$result = apply_filters( 'gogv_shortcode_process', $content );
if ( $result !== $content ) {
return $result;
}

Important Notes

Additional functionalities will be added in future versions.

This plugin requires Gravity Math.

Back to Top

Key Features

Global Variable Definition: Set up reusable global variables that can be referenced across multiple forms. These variables are defined as valid Gravity Math formulas, allowing for quick adjustments in one place rather than updating each form individually. Note: You can create formulas for any shortcode tag you want! If it’s somewhere with merge tag support (like a Gravity View), it will work out of the box. If it’s not, you need to surround the merge tag with the appropriate shortcode tag (e.g. ), and add the following code to the top of your shortcode anippet: $result = apply_filters( ‘gogv_shortcode_process’, $content ); if ( $result !== $content ) { return $result; }

Merge Tags for Global Variables: Easily reference global variables using merge tags within your Gravity Math calculations. This allows formulas to remain clear and concise, improving the readability and maintenance of your forms.

Nesting of Formulas: Support for nesting global variables within other formulas, with the ability to reference infinite levels of variables. This provides flexibility for handling complex or interconnected calculations effortlessly.

User-Friendly Interface: Define and manage global variables through an intuitive user interface. Assign slugs to each variable and quickly input and manage them, reducing the likelihood of errors when building complicated formulas.

Dynamic Formula Updates: Any updates made to a global variable are instantly reflected in all forms using that variable. This reduces the need for manually updating individual forms and ensures consistency across your site.

Back to Top

Global Variable Definition

Merge Tags

Nesting of Formulas

User-Friendly Interface

Dynamic Formula Updates

Key Benefits

Streamlined Form Management: Instead of updating each form individually, users can modify one global variable, and the changes propagate across all forms, saving time and effort.

Enhanced Flexibility: With the ability to nest variables and create complex calculations, users can tackle intricate workflows, providing robust support for a wide range of use cases.

User-Friendly UI: The intuitive interface makes managing complex formulas easy, even for those without technical expertise.

Reduction of Errors: By centralizing variable management, users reduce the likelihood of input errors, enhancing the accuracy of calculations.

Scalability: Whether your site is small or large, the plugin’s ability to handle nested formulas with infinite levels ensures that it scales with your business’s needs.

Back to Top

Automation

Flexibility

Control

User Engagement

Ideal Use Cases

The plugin is particularly beneficial for a variety of users and websites, enhancing their statistical and financial reporting.

Small businesses often need to calculate total revenues, expenses, and profits across different products and services. With this plugin, they can define global variables like {TotalRevenue} and {TotalExpenses} to automate these calculations in various forms. This not only saves time but ensures financial reports are always accurate and up-to-date across the site.

Nonprofits frequently rely on donation forms and event registrations. Using global variables, they can define custom formulas for tracking donation amounts or event costs. This allows for consistent tracking and easy updating of financial metrics without the need to manually adjust individual forms.

Schools and universities can utilize global variables to manage tuition fees, student counts, and scholarship disbursements. By using nested formulas, they can calculate complex variables such as total tuition minus scholarships, providing accurate financial assessments across various forms without the hassle of recalculating each figure.

Ecommerce platforms can create formulas that calculate shipping costs, taxes, and discounts across different products. Global variables enable them to easily update shipping rates or tax percentages in one place, instantly reflecting these changes across all their product and checkout forms, improving efficiency and accuracy.

Back to Top

Small Businesses

Nonprofits

Schools and Universities

Ecommerce Platforms

Changelog

These are the major changes we’ve made to the plugin:

= 1.0.5 =

  • Fixed a plugin conflict with the Members conflict.
  • Minor UI enhancements.

= 1.0.4 =

  • Minor bug fixes and optimizations.
  • Updated Freemius SDK to latest version. Security patch.

= 1.0.3 =

  • Enhanced the UI for creating and interacting with variables
  • Added logos

Back to Top