TutorialCustom Units (%, m2) for Gravity Forms Number Field

Do you want to show custom units like the percentage sign or square meter behind a Gravity Forms Number Field value? The Advanced Number Field Add-on can solve this. It let’s you define your own Custom Unit and place it before or after the input of the Number Field.

Percentage sign Gravity Forms Number Field

If you use the calculation function in Gravity Forms, sometimes you want to show people right away a percentage of the numbers they typed in. For example: The are a number of people that follow a study, and a number of people that passed the exam. You create a number field in Gravity Forms that calculates the percentage: people that passed the exam / total people * 100.

If you have 100 people following the exam. And 20 people that passed. You get: 20 / 100 * 100 = 20%
You probably want to show this as easy as possible: 20%
But that is not so easy in Gravity Forms. The Advanced Number Field Add-on for Gravity Forms provides a solution.

Screenshot of the Add Custom Unit settings in a Gravity Forms Number Field (when Advanced Number Field Add-on is enabled), defining as Custom Unit the percentage (%) sign and placing in After the input.
Screenshot of the Add Custom Unit settings in a Gravity Forms Number Field (when Advanced Number Field Add-on is enabled), defining as Custom Unit the percentage (%) sign and placing in After the input.

Square or cubic feet, inch, meter ft2 in2 m2 m3

You can define any square or cubic metric you want as a custom unit.

Screenshot of example custom unit square inch in Gravity Forms Number Field.
Screenshot of example custom unit square inch in Gravity Forms Number Field.

Other examples of custom units

Here you’ll find some other examples you can use. You can define your custom unit yourself, so many more are possible, but to give an idea we’ve tried to list the most commonly used custom units for you.

Densitykg/m3 | lbm/ft3
Surface areakm² (square kilometer) | hm² (square hectometer) | dam² (square decameter) | m² (square meter) | dm² (square decimeter) | cm² (square centimeter) | mm² (square millimeter) | ft² (square feet) | in² (square inch) | mi² (square mile)
Land areaha (hectare) | a (are) | ca (centiare)
Units of volumecm3 (milliliter (mL) | dm3 (liter) | barrel | ft3 (cubic foot)
Perper night (for example 60/night or 60 per night) | per word (5 per word 5/word) etc.
HorsepowerPS | KM | cv (cavallo vapore, caballo de vapor, cavalo-vapor) | hk (hestekraft) | pk (paardenkracht) | ks (oňská síla, konská sila) | ch (cheval-vapeur) | л. с. (лошадиная сила) | hv (hevosvoima) | hj (hobujõud) | LE (lóerő)
Cookingc (cup) | g (gram) | kg (kilogram) | t or tsp. (teaspoon) | T, tbl., tbs. or tbsp. (tablespoon) | fl oz (fluid ounce | p, pt, of fl pt (pint) | q, qt, fl qt (quart) | g or gal (gallon) | ml, cc (milliliter) | l (liter) | dl (deciliter) | lb or # (pound) | oz (ounce) | mg (milligram)
Temperatures° (degrees) | °C (degrees Celcius) | °F (degrees Fahrenheit)

FAQ Custom Units Number Field Gravity Forms

Can I add a percentage sign (%) inside the input of a Gravity Forms Number Field?

Yes, with Advanced Number Field activated, you can add any kind of sign or text as Custom Unit before or after the number input, including a percentage sign (%).

Does the Custom Unit (like % or m²) inside a Number Field also work within GravityView edit?

Yes, once you activated the Advanced Number Field Add-on and configured a Custom Unit like percentage sign or square meter, this will also be visible when you edit the Gravity Forms Entry in GravityView.

Is the Custom Unit (like % or m²) also visible in the CSV export from Gravity Forms?

No, the Gravity Forms CSV exports the values of the Number Field that are stored in the database. The Custom Units like percentage sign are not visible in the default export of Gravity Forms.

Can I use Custom Units (like #, %, ft²) in combination with rounding the value in the Gravity Forms Number Field?

Yes, the Custom Units like hashtag, percentage sign and square feet work in combination with rounding the value (up to 5 decimal places, with a possiblity to round automatically, up (ceil) or down (floor).

Can I also use a sentence as Custom Unit, like ‘per day’, inside the Gravity Forms Number Field?

Yes, you can for example place the text ‘per day’ after the Number Field input. It will show for example 50 per day inside the Gravity Forms Number Field.

Can Custom Units be used in combination with Currency?

No, Custom Units like percentage sign (%) or other signs or text can not be used when the Number Format is Currency.

Read more tutorials about GravityWP BV

GravityWP develops add-ons to collect and manage your data better.
All tutorials GravityWP BV