Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_currencies

Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

This hook can be used to adjust the attributes of the available currencies in a form.

Usage

add_filter( 'frm_currencies', 'my_custom_function' );

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Parameters

  • $currencies (array)

Examples

Place the euro symbol on the left side of the number

This example will place the euro symbol on the left side of the number.

add_filter( 'frm_currencies', 'my_custom_function' );
function my_custom_function( $currencies ) {
	$currencies['EUR']['symbol_left'] = $currencies['EUR']['symbol_right'];
	$currencies['EUR']['symbol_right'] = '';
	return $currencies;
}

Replace EUR with the code of the currency you want to filter

Remove symbol padding from currency
add_filter( 'frm_currencies', 'remove_euro_symbol_padding' );
function remove_euro_symbol_padding( $currencies ) {
	$currencies['EUR']['symbol_padding'] = '';
	return $currencies;
}

Add a custom currency

Use this code example if you need to add a currency that is not included in the available options.

add_filter('frm_currencies', 'add_custom_currency');
function add_custom_currency( $currencies ) {
    $currencies['KRW'] = array(
        'name' => __('South Korean Won'),
        'symbol_left' => '₩', 'symbol_right' => '',
        'symbol_padding' =>  ' ',
        'thousand_separator' => ',',
        'decimal_separator' => '', 'decimals' => 0,
    );
    return $currencies;
}
  • Replace KRW with the code of the currency you want to use
  • Replace South Korean Won with the name of your currency
  • Replace with the symbol of the currency, which will depend if you want to add it to the left or right.
  • Set the thousand separator, decimal separator, and number of decimals, or add a symbol padding in lines 6-8.

Change Log

Added in version 4.04

Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms