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

Removing Default Values for Calculated Fields

bwilkin
Registered: Sep 3 2008
Posts: 2

As a newbie Acrobat/FormCalc user, I'm hoping this will be a simple question.

I have a simple one page order form with a couple fields to calculate line totals (i.e. 2 items at $5 calculated to $10 total). The problem is that form is also going to be used for hand written orders and Acrobat keeps putting default values of $0.00 in the calculated fields.

I searched the forums and found one post about creating a macro to hide and unhide this fields at print, but it didn't go into detail. It also sounds fairly complex. Can't these values just be turned off through field appearance settings somehow?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
By default, a calculated field has a value, i.e., the value created by the calculation. How are you planning on differentiating between the situatation when the user is entering the values in Acrobat/Reader and when it's printed for manual entry?

One idea is to put a button on the form labeled "Print for manual entry". You could place a script in the button that hides the calculated fields and then calls the print function.

Something like this
MyField.presence = "invisible";xfa.host.print();

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

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