These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Form + VAT

hchl2pr
Registered: Jan 4 2007
Posts: 10

Hi Thom !
I'd like to know if there is a script that calculat the VAT from a texte field ??
 
Ex : We have an amount of : 20$ and VAT : 6%
The total amount should be = 20/100x6
 
Do you think it's possible ??
 
Regards
hchl2pr

My Product Information:
Acrobat Pro 7
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Of course this can be calculated. The best option is to use the Calculate event of the result field. Use a script like this.

event.value = 0.06 * this.getField("Amount").value;

be sure to use the correct field name for "Amount".

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://partners.adobe.com/public/developer/en/acrobat/sdk/
pdf/javascript/AcroJS.pdf]Acrobat JavaScript Reference[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script