Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Show/Hide Page on Radio button click

Avatar

Level 1

All, i am new to Adobe Livecycle, i have Full version of Acrobat 9 i was given Interactive PDF file with forms fields. I would like to know is it possible to hide or show a page of PDF file when specific radio button is checked. I am not able to find any properties within the designer where i can write a script to do it. Can any one please guide me if it is possible or not? or can provide any other guidance i would really appreciate.

Thanks and Regards,

Irfan

6 Replies

Avatar

Level 10

Hi Irfan,

When you set up your workspace, you can arrange the palettes to the left and right of the form. These give you quick access to the various tools and allows you to change settings.

At the top there is a Script Editor. If this is not visible, then you can open it from the Windows menu. I would recommend that you drag the bottom bar so that you can see several lines of code. This is where you type in the script against various events.

Workspace.png

Help is at hand in the forum, but you will also find these resources helpful:

http://www.adobe.com/go/learn_lc_scriptingBasics

http://www.adobe.com/go/learn_lc_scriptingReference

http://www.adobe.com/go/learn_lc_formCalc

http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_M odel_Refer ence.pdf

http://www.adobe.com/devnet/acrobat/pdfs/lc_migrating_acrobat_xmlform. pdf

And a very handy resource (and while it is for version 6 it is still very good because of the way it is laid out):http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf

The help file also helps with syntax and LC Designer comes with templates/examples.

Lastly, check out the Developer's Network on http://www.adobe.com/devnet/livecycle/

JP Terry's book on LC Designer is also excellent.

To answer the original question, yes it is possible to script the click event of the radio buttons so that other objects (like pages) are shown/hidden. Here is an example where the script is in the exit event of a dropdown: https://acrobat.com/#d=iyEHcu7qeSLqQ6b1-Y75dw . A similar approach would work with the radio buttons.

Hope that helps,

Niall

Assure Dynamics

Avatar

Level 4

Niall,

I am unable to get to your example https://acrobat.com/#d=iyEHcu7qeSLqQ6b1-Y75dw.  I just keep getting send to an acrobat.com online services page.  Being able to show/hide page via radio button is exactly what I need to do.  Is there anyway you can provide the example in another way?

Thanks!
Jodi

Avatar

Level 6

This is FormCalc on the click event of a check box:

if ($.rawValue==1)then

P1.subformelmo.presence="visible"

else P1.subformelmo.presence="hidden"

endif

In this example the subform on page 1 is hidden until the box is checked.

Avatar

Level 4

Any chance you have it in Java

Avatar

Level 4

That is exactly what i needed!! Thank you so much!!!