Turn their measurements into the right quantity to order.

A 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.

Moonleaf nursery Packs of 6
10 ft × 10 ft
Plants to order10217 packs × 6 plants
100 needed → 102 to order12 in spacing

The calculated quantity rounds to a pack size the nursery sells.

Illustrative experience

  • Area and spacing do the arithmetic
  • The answer is a quantity, not a price
  • Rounded to a pack you can ship

The finished experience

They order the right amount the first time.

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.

  1. 1

    Collect the space

    Length and width, plus the spacing that belongs to the product they have chosen. Those three numbers are all the arithmetic needs.

    Gravity Forms

  2. 2

    Work out how many fit

    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

  3. 3

    Round up to a real pack size

    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

What you’ll need.

Start with Gravity Forms. Add the capabilities this solution needs, then make the experience your own.

Before you start

  • Positive measurements and spacing for the selected product, plus the pack size you sell in.
  • Choose one rounding method: install Rounding free through Spellbook, or use Advanced Calculations.

Get this built.

This solution uses a free plugin. Nothing to license from us.

Pick your rounding method

Rounding Free

Free to use with Gravity Forms.

Get Rounding — it’s free

Make it fit
your project.

Do I need both Rounding and Advanced Calculations?

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.

Why did the spotlight use both?

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.

Does it have to round up?

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.

What if every product has its own spacing?

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.

Could the same form price the order too?

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.

  • Clay, CTO
  • Dan, Content Sorcerer
  • Dani, Product Manager
  • David, Founder & CEO
  • Matt, Senior Support Wizard
  • Roxy, Support Wizard

Not quite your build?

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.

Ask the wizards