Vivek Gajula
Vivek Gajula

Reputation: 21

How to hide/display a page in a PDF based on a check box

I am creating an interactive PDF using Adobe Livecycle. My PDF has 4 pages and the last page is hidden.

I want to be able to display this hidden page based on a check box. Whenever a user selects this checkbox the page has to be visible.

I have used the action builder to change the presence of the last page to visible/hidden based on the checkbox. This was working fine until I added baseProfile="interactiveForms" to the template XML node in the XML Source. I had to add this tag in order to add custom javascript code to to the PDF. Without the interactiveForms attribute the action to hide/display the page works, but I am not able to add the custom javascript that I need to run on the PDF.

Greatly appreciate any help!

Upvotes: 1

Views: 10060

Answers (1)

puppetmaster
puppetmaster

Reputation: 174

Use this code on the exit event of the checkbox:

if (this.rawValue == 0){
   xfa.resolveNode("Page4").presence = "hidden";
}else{
   xfa.resolveNode("Page4").presence = "visible";
}

Upvotes: 1

Related Questions