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.