I am trying to multiply a value from a form field by a constant and can not come up with the correct syntex. For example, I have a field for "quantity" and a field for "total" which is the "quantity" times a specific amount (the constant). I've tried the following:
var a = this.getField("pen wood qty");
var b = 40.00;
event.value = b.value * a.value;
which does not work. This is simple mathematics but I can't find out how to use make it work. Help would be appreciated, thanks!
Though this would be better:
I put the code in the anonymous function that calls itself to limit the scope of any variables that are declared. This is a good practice to get in the habit of for code that you place in field events.
George