Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snaptortoise/gravity-forms-minmax
Adds MIN and MAX functions for Gravity Forms number field calculations
https://github.com/snaptortoise/gravity-forms-minmax
gravity-forms gravityforms minmax wordpress wordpress-plugin
Last synced: 3 months ago
JSON representation
Adds MIN and MAX functions for Gravity Forms number field calculations
- Host: GitHub
- URL: https://github.com/snaptortoise/gravity-forms-minmax
- Owner: snaptortoise
- License: gpl-2.0
- Created: 2018-02-20T22:17:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-12T07:01:02.000Z (over 3 years ago)
- Last Synced: 2024-06-19T23:15:48.063Z (5 months ago)
- Topics: gravity-forms, gravityforms, minmax, wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://snaptortoise.com/wordpress/plugins/gravity-forms-minmax/
- Size: 168 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-gravity-forms - Gravity Forms MIN/MAX Calculations - Adds MIN and MAX functions for Gravity Forms number field calculations. (Third-Party Add-Ons)
README
# Gravity Forms MIN/MAX Calculations
Adds MIN and MAX functions for Gravity Forms number field calculations.
[https://wordpress.org/plugins/gf-minmax-calculation/](https://wordpress.org/plugins/gf-minmax-calculation/)
## Description
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.
## Examples
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)`
## Installation
### From the WordPress Admin Area
1. Download the plugin zip file from [https://wordpress.org/plugins/gf-minmax-calculation/](https://wordpress.org/plugins/gf-minmax-calculation/)
1. Log in to your WordPress admin area and navigate to the `Plugins` page
1. Click `Add New`, then click `Upload Plugin`
1. Click `Choose File`, then locate and select the plugin zip file
1. Click `Install Now`### Using FTP
2. Upload the entire `gravityforms-minmax` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.## Thanks
Thanks to [@michaeldozark](http://github.com/michaeldozark) for his [Gravity Forms exponents plugin](http://github.com/michaeldozark/gravityforms-exponents) which served as a good example of extending the built-in Gravity Forms calculation function.