1
0
-1

I am creating a currency converter project and i need to read the input value from the end user so that i will be able to do mathematical calculations. The input field is of type decimal. Please help. Thanks.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi,

      Decimal fields are stored in the form data object as string values, so they need to be converted to a JavaScript number data type before you can use them in a mathematical calculation.  In JavaScript this would be simply done by prefixing the field name with a plus sign.

      Luckily, this is already taken care of for you by the rule editor.  Double-clicking a decimal field in the rule editor will output a + followed by the field name into the rule code.

      The same applies to Currency fields.

        CommentAdd your comment...