I know very little about javascript. I want to make a fillable pdf and I need to have a custom calculation script in javascript.
I have one Field called GT
the field underneath it is called Deposit
the field underneath deposit is RDC
the field underneath deposit is AD

I need to have the field RDC have a custom calculation javascript which checks if the deposit is greater than GT then RDC would equal Deposit - RDC and if the Deposit is less than GT then AD would equal GT - Deposit. Can anyone help me please.