Adds MIN and MAX functions for Gravity Forms number field calculations.
https://wordpress.org/plugins/gf-minmax-calculation/
This WordPress plugin adds MIN()
and MAX()
functions for Gravity Forms number fields calculations. It can be used to determine the highest or lowest value from any number of passed arguments, including merge tags.
This will return the smaller of the four fields (inserted as merge tags) and proceed to divide it by 2:
MIN({Field:1}, {Field:2}, {Field:3}, {Field:4}) / 2
This will return the larger of two fields and proceed to multiply by 4:
MAX({Field:1}, {Field:2}) * 4
This will return either the value of a field (if above zero) or zero:
MAX({Field:1}, 0)
This will return either the value of a field (if below zero) or zero:
MIN({Field:1}, 0)
You can include calculations within the arguments themselves, for example
MIN({Field:1} * 2, {Field:2} / 2)
- Download the plugin zip file from https://wordpress.org/plugins/gf-minmax-calculation/
- Log in to your WordPress admin area and navigate to the
Plugins
page - Click
Add New
, then clickUpload Plugin
- Click
Choose File
, then locate and select the plugin zip file - Click
Install Now
- Upload the entire
gravityforms-minmax
folder to the/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
Thanks to @michaeldozark for his Gravity Forms exponents plugin which served as a good example of extending the built-in Gravity Forms calculation function.