Equation Calculation Issue | WordPress.org

[ad_1]

Hi,

I’m trying to create a volume calculator using length (m), width (m) and height (mm) to give a result in cubic meters.

I’ve set up 3 number fields and a calculated field with the equation fieldname2*fieldname6*fieldname10 but I’m having issues getting the result to display the way I want it.

For example if a user puts 75, 50 and 10 in the number fields it returns a calculation of 37500 which is the correct number, however I’d like it to display as 37.5 without the extra digits at the end. I’ve tried using the PREC formula with no success.

Any help would be greatly appreciated!

  • This topic was modified 6 minutes ago by simonbry.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer