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

User enter a CPU calculate a value

brennanhobart
Registered: Oct 9 2007
Posts: 37

I have a software oder form at [link=http://doit.missouri.edu/software/sales/autocad.pdf]http://doit.missouri.edu/software/sales/autocad.pdf[/link] I need to calculate in $400 to the AutoCad subtotal when the user enters the CPU serial number for each computer. I also need to calculate on the same form for every CPU number entered in the other software add $200 to that subtotal. I'm used to having UnitCounts but this has me stumped. Any suggestions? Thanks.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The PDF file at the above link is flat, i.e., it only contains non-interactive page content. So the first thing you need to do is to place interactive form fields on it.

You should also do some reading on Acrobat forms and JavaScript. You can find more info at:

[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Click on the "Documentation" tab. You'll also find some useful info at:

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/index.php?sort=true&search_keyword=All]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/index.php?sort=true&search_keyword=All[/url]In particular, there is an article on calculations and several on entering scripts.

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/form_calculations/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/form_calculations/[/url]

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

brennanhobart
Registered: Oct 9 2007
Posts: 37
Thom,

Your right it was simple. This statement in the subtotal did it.

if (Page1.Software.ChemOrder1.ChemOfficeCPU1 == Null) then $ = Null
else $ = 30
endif