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

Hide / Show Pagebased on checkboxes

koenigma
Registered: Jan 23 2008
Posts: 45

The form I am working on has 2 checkboxes "Yes" & "No", and depending on which one is checked I would like a page to be displayed or hidden.

I have set the SupplementPg presence to Hidden.

I have tried both versions of the code shown below but nothing changes

if ( rdoSupp.rawValue == 1)
{_SupplementPg.setInstances (1);}
else
{_SupplementPg..setInstances (0);}

if (rdoSupp.rawValue == 1)
{_SupplementPg.presence = "visible";}
else
(rdoSupp.rawValue == 0)
{_SupplementPg.presence = "invisible";}

Any help would be appreciated.
Kind Regards
Martin

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Is the form saved as dynamic? This is a requirement for using any runtime dynamic features.

Also, there are a couple of fatal errors in this code. Check the console window when you open this form in Acrobat and make sure you don't have any reported errors.

And just as a matter of neatness, don't use the "_" notation on subform names unless the code really does use the instance manager.

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