- $col_name: column name
- $prefix: currency prefix. The default is USD symbol, $
- $suffix: currency suffix. The default is blank.
- $thousandsSeparator: The character as the thousands separator. The default is the comma character “,”.
- $decimalSeparator: The character as the decimal separator. The default is the dot character.
- $decimalPlaces: The number of digital is displayed after the decimal point. The default is two.
- $defaultValue: The value display when the value return from database is null or empty string. The default is 0.00
- This is helper method to display currency value. It formats column as currency when displayed. The value is automatically unformatted during CRUD operations.
$dg -> set_col_currency("price", "EUR", "", ",", 2, "0.00");
How to enter comma as decimal separator during data entry
The function set_col_currency() is a specialized formatter for displaying currency only. During data entry, it is still required to use the dot/period symbol is as the decimal separator.
$afterShowForm = <<<AFTERSHOWFORM