Rounding numbers in Caldera Forms
-
I have made a pricing calculation form using Caldera Forms. Currently I have problems rounding the numbers or removing all decimals, and would really appreciate any help.
If it was possible to format the numbers and round the numbers easily, I would pay for the plugin. But for now it does not seem to be possible and I might have to switch to another product.
Heres what I’ve done:
Dropdown with products, monthly prices as value. (free, std, pro)
Dropdown with subscription type (month by month, 1 year, 2 year, 3 year) discount as value.
Field for typing number of computers.I have successfully calculated:
Total monthly price (product monthly price * number of computers)
Total monthly price with VAT (Product monthly price * 1,25)
Monthly discount (Total monthly price * subscription type)
Total monthly price after discount
etc…But, the problem is that calculated numbers easily get like 8-15 decimals. Does not look good at all. I live in Europe and had to edit thousand separator and decimal separator, that’s supported.. but not the number of decimals.
So I tried this workaround:
Hidden field with calculation as value and then using the hidden field in manual formula like this:
round( %hidden_field% ), but this does not work. It seems that the value of the hidden field does not update/recalculate when other fields changes.So using the “normal” method (not Manual Formula) calculated field I get correct value when I do this formula:
%priv_abo_discount% * %number_pcs% * %product%But not when I do the same as value in a hidden field, and then “round( %hidden_field% )” in a Manual Formula in the calculated field. If I could hide the correct calculated field altogether and then round it in another calculated field using manual formula, that would possibly work, but that’s not possible either.
Please anyone.. How can I get rid of decimals or just round up to nearest number?
- The topic ‘Rounding numbers in Caldera Forms’ is closed to new replies.