Questions, suggestions and discussion around ProcessMaker 3 documentation
By Madz7104
#793674
Good Day!

How to sum number in 2 or more dropdown control and display the result in other textbox control?

Need your help :)

Thank you!
User avatar
By amosbatto
#793712
Add JavaScript like this to your DynaForm:
Code: Select all
$("#field1").setOnchange( function(newVal, oldVal) {
   var sum = parseFloat(newVal) + parseFloat( $("#field2).getValue() );
   $("#total").setValue(sum);
});
$("#field2").setOnchange( function(newVal, oldVal) {
   var sum = parseFloat(newVal) + parseFloat( $("#field1).getValue() );
   $("#total").setValue(sum);
});
Where "field1" and "field2" are the IDs of the two fields to sum and "total" is the ID of the field which displays the result.

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]