Home » PDF Forms, PDF JavaScript

Tip: Using a Calculation to Hide/Show a Field

8 Jan 2009 | | 2 Comments

Well, it’s been a while since I’ve worked with PDF and JavaScript, but I always remember that with a bit of patience and know-how, you really could accomplish some pretty amazing tasks. I asked my friend Thom Parker, CEO of pdfscripting.com and WindJack Solutions if had any examples to get me started again and he sent me back this tip.

I like the way he’s put it together — the instructions and the working example are contained within a single page PDF,  Using a Calculation to Hide/Show a Field (right-click and choose save-as).

Acrobat provides easy, non-scripting methods for adding many types of calculations to a form, such as summing entries in a column or adding tax into a total. But what do you do if you want a calculation that does something that’s not just math? For example, maybe you have a form on which you want to show a field only when the field’s calculation result is greater than zero. While the calculation itself might be straightforward, the total result of the calculation is not. For this we need to use JavaScript…

As he says, it’s simple, and this same technique can be used to control all kinds of form field properties through calculation results…. Thanks Thom!

No related posts.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

2 Comments »

  • mergepdf.net joins the ranks of online PDF merging utilities | 4xPDF Blog said:

    [...] I have found at least one document containing JavaScript (such as our Tip from PDFScripting.com to Show/Hide form fields) does not function correctly after merging with all of these services. Related Posts:Merge PDFs [...]

  • Bala said:

    it was a nice info. I got what i was searching for.
    Handy and useful. Will be recommended.:)

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.