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

Hiding form pages using JavaScript

ToadMcFrog
Registered: Feb 18 2010
Posts: 4

Hello All!

I'm having a problem with form pages in LiveCycle. I want to have a "launch page" where users can select form functions using check boxes, and those pages will remain hidden until the corresponding checkbox is checked. I am trying this out using a simple 2 page form with a single checkbox on the first page (not on the master page), and I can't get it work with this code on the click action:

if (this.rawValue == 1)
form1.Page2.presence = "visible";
else
form1.Page2.presence = "hidden";

I have a handicap here, in that I am working with an old version of Designer (7.0). However, I found an example page that radzmar had created using similar functionality that works without issue.

Any help is greatly appreciated

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, the form has to be saved as Dynamic, and since this is JavaScript code, it has to be marked as such in the Designer scripting window.

I'm pretty sure your code will work in Acrobat 7. But the next thing you need to check is the JavaScript Console window to see if any errors are reported.

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/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

ToadMcFrog
Registered: Feb 18 2010
Posts: 4
Thank you for your reply.

I just got it figured out - and boy, do I feel stupid. I had neglected to give the page the correct name, so I was calling it incorrectly in the code. After that, it was only a matter of setting the "place" property correctly...

I apologize for the newbie post - thanks again for the help!