Copy link to clipboard
Copied
Have successfully created a form that will add the prices for the gross order total, then the next line calculates the taxes,in which the net total is the sum of the gross order total and taxes. I am now needing to get the amount due, which is the net total minus a variable for a credit ($0-$75). I am not creating the proper calculation script. Can anyone assist? I am very new to this but here is what I currently have that is not working:
var d = this.getField("Net Total");
var s = this.getField("GCU Adjustment");
event.value = d.value - s.value
Copy link to clipboard
Copied
The code looks fine. What exactly is not working correctly?
Copy link to clipboard
Copied
It ill not populate anything.
Copy link to clipboard
Copied
* Will not
Copy link to clipboard
Copied
Are you getting any errors on the JavaScript console? You can use Ctrl-J or Cmd-J to show the console window.
Copy link to clipboard
Copied
I am receiving multiple errors : s is null; f is null; vars is not defined and also vard is not defined.
Copy link to clipboard
Copied
Assuming everything else is correct, this would suggest that there are no fields with these two names in your form. Make sure that you spell the names exactly as they are spelled in the field properties.
Copy link to clipboard
Copied
Thank you Karl. I went through and corrected the spelling in all of them and it works now. I feel a little silly not seeing that on my own but that you for being so kind and for your assistance! Be well.