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

Conditional JS show/hide on radio button select

FayeC
Registered: Jan 9 2008
Posts: 15

Hi,

I have a few forms in HTML that have conditional show/hide behaviours applied to radio buttons or checkboxes.
So for example when radio button 1 is selected text fields 1 and 2 are shown and when radio 2 is selected fields 3 and 4 are shown. Both radio buttons have behaviours to hide the other text fields.

I have created pdf forms from those html forms but the JS behaviours are removed.
How do I apply the same behaviours in Acrobat 8 Pro? Will I need to manually create the hidden fields?

Thank you in advance,

FayeC

tplumer
Expert
Registered: Dec 1 2005
Posts: 122
You have two options:

1. Attach behaviors to the Radio buttons to Show/Hide the fields. It's a little cumbersome to set it up, but it requires no scripting. I have an example file you can look at to see what I mean. Use the Radio Button tool to look at the Actions attached to the radio buttons. [url=http://homepage.mac.com/tiplumer/Radio_button_example.pdf]The File[/url]

2. Write a JavaScript action and attach it to the Radio buttons. This is a little more elegant than the show/hide, but it requires yo to write the JavaScript. I don't have a good example of such a file, but you can grab the Acrobat JavaScript reference guide from Adobe:[url=http://www.adobe.com/devnet/acrobat/javascript.php]JavaScript Developer resources[/url]

I am a long-time Acrobat user, an employee of Adobe Systems, and Maine native. I have created training videos for Total Training, consulted with people to help them better use Acrobat, and developed new business for Adobe as a Business Development Manager

FayeC
Registered: Jan 9 2008
Posts: 15
Is there a way I can add the actions in LiveCycle Designer?
I have html forms that I have converted to pdf using the Acrobat forms wizard which allows me to edit all of the form (text and form fields) in designer.
The issue is that I can't seem to be able to find a way to add actions to the buttons in Designer and after the form is saved I haven't found a way to take it back to Acrobat to add the actions or to give usage rights in Adobe reader to the form.
am I missing a step?

FayeC