how to calculate the true values of dropdown/checkbox items

[ad_1]

Hello @krstnz

Thank you very much for using our plugin.

Assuming you have two fields, the dropdown field fieldname1 with the prices, and fieldname2 a number field for quantity, you must insert a calculated field in the form and enter the equation:

fieldname1*fieldname2

Note the choices’ values in the dropdown field (fieldname1) must be valid Javascript numbers without currency symbols. In javascript, the decimal symbol is the point and not the comma (Ex. 11.32)

If the equation results are currency values, and you want them with two decimal places, you can use the PREC operation as the outermost operation.

PREC(X, Y) rounds the number X with Y decimals.

Continuing with the hypothetical equation above, you can edit it as follows:

PREC(fieldname1*fieldname2, 2)

Best regards.

 

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