Rounding
The free option: round the native Gravity Forms result to a pack increment. Use this or Advanced Calculations, not both.
Explore RoundingA restoration nursery’s customers know the size of the plot, not how many plants fill it. The form works that out from the spacing for the product they picked, then rounds to the packs it ships in.
The calculated quantity rounds to a pack size the nursery sells.
Illustrative experience
The finished experience
The number on screen is one you can actually fulfil, so nobody tries to buy 97 of something sold in sixes.
A good fit for
Anyone who sells by coverage: plants, tiles, turf, paint, fencing.
Length and width, plus the spacing that belongs to the product they have chosen. Those three numbers are all the arithmetic needs.
Gravity Forms
An ordinary Gravity Forms calculation takes the area to square inches and divides it by the spacing squared: ((length × width) × 144) ÷ (spacing × spacing).
Gravity Forms
With free Rounding, add gw-round-up-6 to the calculated Number field to sell whole packs of six. A plot needing a hundred plants asks for 102: seventeen complete packs. If you already use Advanced Calculations, ceil(rawQuantity / packSize) * packSize does the same job without Rounding.
Rounding
Start with Gravity Forms. Add the capabilities this solution needs, then make the experience your own.
The free option: round the native Gravity Forms result to a pack increment. Use this or Advanced Calculations, not both.
Explore Roundingif (F1 >= 10):
round(F1 * F2 * 0.9)
else:
F1 * F2
endif;
The formula option: use ceil(rawQuantity / packSize) * packSize to round up to whole packs. Replaces Rounding when you already use this perk.
This solution uses a free plugin. Nothing to license from us. This solution spans two suites, so it takes two licenses — bought one at a time, in either order. A plan covers how many of our plugins you run at once, and on how many sites. Here is what this one needs.
Pick your rounding method
Choose one. The plan updates to match.
Free to use with Gravity Forms.
Free to use with Gravity Forms.
Separate licenses, separate checkouts. Start with either one.
Every plan renews at the same price, and you can upgrade any time for the difference.
No. Gravity Forms handles the area and spacing arithmetic. Free Rounding can round that result to pack increments. If you use Advanced Calculations instead, ceil(rawQuantity / packSize) * packSize rounds every partial pack up inside the formula, so leave Rounding out. Replace the example variable names with your field merge tags or actual values.
MNL used native Gravity Forms calculations, Advanced Calculations for its formula editor, and the free Rounding plugin for pack increments. That describes the original build; it does not mean both plugins are required to round quantities in a new one.
No. For packs of six, Rounding supports gw-round-6 for the nearest pack, gw-round-up-6 to always round up, or gw-round-down-6 to round down. Advanced Calculations offers round(), ceil() and floor() for the same choices. This example rounds up so the order covers the calculated quantity.
Give each product’s choice the spacing as its value. The calculation reads whatever lands in that field, so one form covers the whole range.
Yes. Round the quantity in a Number field, then use it in the product calculation. The free Rounding plugin does not round Total or Product price fields directly. The advanced pricing solution covers more involved pricing rules.
Explore more ways to build with Gravity Forms.
More ways to build
40 tees · $18 each
Tell us what you are making and we will work out which pieces it takes — or tell you straight if this is not something we can do.