Remove Decimals from Number Field [RESOLVED]

Good morning, hoping for some help please. Added the following code into WordPress built-in CSS Editor, but it doesn’t work. Do I need to do more?
add_filter( ‘gform_currencies’, function( $currencies ) {
GFCommon::log_debug( METHOD . ‘(): running.’ );
// Set decimals allowed for GBP to 0.
$currencies[‘GBP’][‘decimals’] = 0;
return $currencies;
} );

PHP code like that would need to be added to the theme functions.php file, a custom functions plugin, or a code snippets plugin.

Note: changes made via the gform_currencies filter will only apply to the Number field if it is set to the currency format.

1 Like

Thanks for your help.