CalcBuilder Forum

max. decimals in inline results

User zen11t 2018-01-16 19:14:44

Hi!

How can i set inline result fields max decimals?

Thank you very much,

Zen11t

Moonsoft support 2018-01-17 08:53:10

Hi,
as you have available all valid php functions you can use the round function in order to round to specific number of decimal places, or number_format function if you want to add any specific format to the output, here the official pages regarding these functions:


http://php.net/manual/en/function.round.php

$your_result=round($your_result,2);

or

php.net/manual/en/function.number-format.php

$your_result=number_format($your_result,2,".",",");

Hope this helps, regards

User zen11t 2018-03-07 17:22:20

Thank you very much.

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!