How to write script so that when checkbox is checked, a subtraction is completed
Hello,
I am making a somewhat follow-up post to my previous one involving the same form from that last post. Here is the link to that question.
What I am trying to do now is there is a checkbox next to my Site Assessment. I want it so that when the checkbox is checked, the site assessment gets subtracted from the total. I've tried a few different code options and it still doesn't want to compute for me.
Here is a sample of what I wrote:
// if Assessment Paid box is checked, subtract assessment from RequiredTotal
if (this.getField("Assessment Paid").value != "Off")Number(this.getField("RequiredTotal").value) - Number(this.getField("Required").value);
Any help would be greatly appreciated, thanks in advance!