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

Hiding subform when form is opened

karen333
Registered: Jun 30 2009
Posts: 2

I have the following javascript associated with a checkbox and a subform:

form1.SHCognitionCheckBox::change - (JavaScript, client)
if
(this.rawValue == 1)
CognitionBehaviorSubformCheckBoxes.presence = "visible";
else
CognitionBehaviorSubformCheckBoxes.presence = "hidden";

My intention is to make the subform visible only when the checkbox is checked.

If the checkbox is MANUALLY checked or unchecked, the subform becomes visible or hidden, as expected.

HOWEVER, whenever a previously saved form is initially opened, the subform is ALWAYS VISIBLE, regardless of whether the checkbox is checked or unchecked.

Is there a way to cause the subform to be HIDDEN when the form is opened with the checkbox unchecked?

I have tried different approaches: reversing the logic (checking the checkbox to make the subform hidden instead of visible), and trying different default values for the checkbox. No matter what I try, the subform is ALWAYS visible when the form is opened.

I can hide the subform only by MANUALLY either unchecking the checkbox (if it is initially checked) or checking and then unchecking the checkbox (if it is initially unchecked).

Note: The above behavior is what I see either when I "Preview PDF" from LifeCycle Designer or when I open the form in Acrobat Reader.

Thanks.

My Product Information:
LiveCycle Designer, Windows
suewhitehead
Registered: Jun 3 2008
Posts: 232
You have to set the subform to be hidden in LiveCycle Designer. Open the form in the Design View. Select the subform in the Hierarchy. Then in the right pane on the Subform tab, change the Presence to Hidden. Save your form and it should always open with the subform hidden until you check the box.