Copy link to clipboard
Copied
I have two fields in my form. I type in the 1st field a dollar amount I want it to add $10 from the first field in a 2nd field. ( this part I can do). My problem is that if nothing is written in the first field I don't want the calculation performed in the 2nd field.
I hope this makes sense. Thanks for your time.
Copy link to clipboard
Copied
You want to add 10 to the amount in first field?
Let's say your fields are named "Field1" and "Field2", as custom calculation script of "Field2" use this:
var f1 = Number(this.getField("Field1").value);
if(f1)
event.value = f1+10;
else
event.value = "";
Copy link to clipboard
Copied
I just wanted to thank you for your assistance. It worked perfectly.