How To Change Currency Format in Gravity Forms

As great as the number one WordPress forms plugin is, Gravity Forms has one glaring omission – no front end settings for currency formatting. The default you’re stuck with it this:

100,00 € which is supposed to denote one hundred euros or €100. This can confuse some people who mistake it for one hundred thousand!

The only way to change it is by adding the following code to your themes “functions.php” file. This example is what you need to show currency in Euros with the € symbol on the left, a comma thousand separator and 2 decimal places:

add_filter( 'gform_currencies', 'update_currency' );
function update_currency( $currencies ) {
    $currencies['EUR'] = array(
        'name'               => __( 'Euro', 'gravityforms' ),
        'symbol_left'        => '€',
        'symbol_right'       => '',
        'symbol_padding'     => ' ',
        'thousand_separator' => ',',
        'decimal_separator'  => '.',
        'decimals'           => 2
    );
 
    return $currencies;
}

NB: making this change may change any existing prices you have on your form to thousands so you’ll need to go into each price and fix.

Published by

Leon Quinn

Multimedia Design company in Leitrim, Ireland specializing in WordPress Website Design, Photoshop and Graphics. www.reverbstudios.ie

5 thoughts on “How To Change Currency Format in Gravity Forms”

  1. This is good hack, but 4th line has an error of the double dash `”name” =–> __(“Euro”, “gravityforms”), `

    It should be
    “name” => __(“Euro”, “gravityforms”),

    Liked by 1 person

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.