Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Presence field not working

Avatar

Level 2

I'm trying to have a dropdown list display when a user clicks the YES radio button.   The dropdown list is hidden or invisible when the user clicks the NO radio button.  When the form initializes, the dropdown list is initially invisible or hidden.  

I am using LiveCycle Designer ES (8.2.1.4029.1.523496).  I started with a blank document, dynamic is my default, I chose save as and made sure that dynamic was the document type.  I also made sure that my Form Properties was set for JavaScript and Dynamic.

I cannot get this to work.  I put both of these under "change" and "click" events on the "YES" radio button:

DropDownList1.presence = "visible";

form1.pageSet[0].Page1.DropDownList1.presence = "visible";

I put the "invisible" version of the above two lines under the "NO" button change and click events.

When I save the form and open it in Adobe Reader, nothing happens when I click YES.  The invisible field stays invisible.  It's like JavaScript isn't working.

Can you get this displaying a hidden or invisible Dropdown List to work?  If so, how?

You can see a test file I've setup here: http://www.bustedchain.com/a/test.pdf

I'm very frustrated that I can't get such a seemingly simple thing to work.  Thanks for any help you can provide.

5 Replies

Avatar

Level 10

Hi.

Is there any reason you only have a masterpage in your form?

There must be at least one regular page in the form.

Add one to your form, then move the radio button group and the dropdownlist from the masterpage to that page.

Remove all current scripts you added to the radio buttons.

Select the radio button group and add this script to its click event.

DropDownList1.presence = this.rawValue === "1"? "visible":"hidden";

Avatar

Level 2

I tried doing it on a regular page first and when that didn't work I consolidated it to the master.

I've put ot back to the regular page and I believe I have it setup the way you've said.   It still doesn't work.  It acts like Javascript is turned off.   Even the call in DocReady to make the dropdown list hidden or invisible doesn't work.

See:  http://www.bustedchain.com/a/test2.pdf

It also makes me wonder, why can't I have it as part of the YES and NO boxes independently where one is clicked it makes the box invisible and the other one makes it visible.   Yes, a single line solution is elegant, but it is not easier to read and there are situations where I would like the code split apart based on section.

Avatar

Level 2

Even this isn't working in the form1::docReady section:

this.SubformPage1.DropDownList1.presence = "hidden";

SubformPage1.DropDownList1.presence = "hidden";

Just trying to have the dropdown list start off as hidden.

Is there a compatibility issue with LiveCycle ES (8.1) and Windows 7?

Avatar

Level 2

I think there is a problem on our systems.   This document (page 2) supposedly is a working example of a subform being hidden,visible, invisible based on a radio box.  This document (again on page 2) doesn't work on either of our Windows 7 systems here at work.  I'm suspecting a computer configuration issue now.

Link: http://www.assuredynamics.com/wp-content/uploads/2010/11/Assure-Dynamics-Changing-the-objects-presen...

Can you confirm that this PDF works for you?

Avatar

Level 2

I figured out that JavaScript was disabled in Adobe Acrobat.   Company must have pushed down a setting that disabled JavaScript in there because it is the same on multiple machines here.  That explains why I'm pulling my hair out trying to get button clicks to work. 

It doesn't explain why my javascript "DocReady" works on some PDFs and not on others.  Hmmmm.  Weird behavior.