Copy link to clipboard
Copied
I've been trying a JavaScript that computes the remaining balance.
The customer picks a package which assigns a price to the subtotal and when the customers enter a deposit it should generate the remaining balance. I've tried this javascript
var t = getField(“Price”).value;
var d = getField(“Deposit”).value;
event.value = t - d;
but it is not working.
Is there anything wrong with the JavaScript? Please help!!
Copy link to clipboard
Copied
If those field names are correct, the field calculation order is correct, and you placed the code as a custom calculation script, it should work. You can check the JavaScript console for errors by pressing Ctrl + J.
Copy link to clipboard
Copied
You're using non-standard quotes. Use only straight quotes, either doube ( " ) or single ( ' ).
Find more inspiration, events, and resources on the new Adobe Community
Explore Now