ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Calculation with comma

patrick.h 29 Jun, 2018
Hi,

how can i calculate with comma in my CF6?
The code (Code from https://www.chronoengine.com/faqs/74-chronoforms/chronoforms6/5314-creating-a-calculation-form-in-chronoforms6)
$("#field1,#field2").on("change", function(){
	$("#total").val(parseInt($("#field1").val()) + parseInt($("#field2").val()));
});
works fine but unfortunately only with dot instead of comma

I use "parseFloat" instead of parseInt
$("#forderungen-berechnen").on("click", function(){
$("#forderungen-offen").val(parseFloat($("#forderungen-betrag").val()) - parseFloat($("#forderungen-gezahlt").val()));
});
GreyHead 18 Jul, 2018
Answer
1 Likes
Hi patrick.h,

You are welcome.

Please see the PHP manual here

Bob
healyhatman 19 Jul, 2018
That's a JQuery question mate not a Chronoforms or PHP question. Try Google.
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com