How to Add Three Decimals with Gravity Form Currencies

Gravity Forms provides support for a variety of currencies out of the box and allows you to change the currency for your forms on the Gravity Forms settings page.

Most default currencies will be set to two decimal places but what if you need to change this to three decimal places or some other number?

Enter the gform_currencies filter! This handy little snippet will allow you to select a currency and change the number of decimals used when working with the specified currency.

In the example above, we are using the Euro (EUR) but you can replace this with any of the supported currencies. For a full list of Gravity Form Currencies please see our article on Gravity Form Currencies.

Bulk Pricing
Using three decimals is commonly used with bulk pricing. This means the more you buy the cheaper the per unit cost. If you’re looking for a simple way to setup bulk pricing, check out our powerful pricing plugin, GP Conditional Pricing

Comments

  1. David
    David April 6, 2023 at 1:27 pm

    Hi there. Thanks for the code. Could you please let me know if there’s a way to apply this filter to a specific form? (as opposed to all forms on the site). Thanks again.

    Reply
    1. Farzad
      Farzad April 2, 2019 at 9:01 am

      I have a problem with the number of decimals in the gravity ,single product, Can I increase the number of decimal places by adding this code?

  2. Max
    Max November 21, 2018 at 2:35 pm

    Hi,

    I am using this filter and it works so far. The price in single additional options is displayed without decimal. But the calculated total price in css class .formattedTotalPrice and ginput_total still shows 2 decimals. It seems that no filter out there is able to access this price. Do you know more about that?

    Reply
  3. philip
    philip October 23, 2018 at 7:24 am

    Hi wiz, I’m using this code and it works fine, but now in the calculating fields the prices show up also with 5 decimals, is there a way to fix that. like a filter that only targets the calculation fields to round up 2 decimals. from 23,34667 to 23,35.

    Help needed.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.

Download Snippet

How to Add Three Decimals with Gravity Form Currencies

This field is for validation purposes and should be left unchanged.