Support » Plugin: Ninja Forms - The Easy and Powerful Forms Builder » Removing decimals in calculations

  • Resolved xcept

    (@xcept)


    Hey guys,

    Im sitting and multiplying different decimal figures, and that all goes great…

    Get results like 1,241412414 and 7,231231 and i just want it to say 1 or 7

    I have seen places where people advice to use {calc:my_variable:2} etc as a format, but this does nothing, am i missing something? It oddly enough doesn’t reduce any decimals.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author krmoorhouse

    (@krmoorhouse)

    Hey xcept,

    The intent of the {calc:calcname:2} merge tag was to be a bandaid for a bigger development issue, which we have resolved in an upcoming version of Ninja Forms. I would suspect that the merge tag isn’t properly correcting your decimal places because your decimal separator is a comma instead of a period, which the original fix probably wasn’t built to properly handle. That is something that our upcoming release also resolves, but it should allow you to be more specific with how many decimals you want to round to.

    Plugin Author krmoorhouse

    (@krmoorhouse)

    Hey xcept,

    With version 3.1 out, your issue should now be resolved.

    Marking this done, due to no recent replies.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing decimals in calculations’ is closed to new replies.