Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Change Events (Show/Hide Subforms)

Avatar

Former Community Member

Hi guys i need some help, i have a some subForms that i want to manipulate with a dropdown list, and i've tried to do this with this code in the exit event,

if (this.rawValue ==1) {

xfa.resolveNode("form1.theForm.subForm1").presence= "invisible";

xfa.resolveNode("form1.theForm.subForm2").presence= "visible";
}

else if(this.rawValue ==2) {

xfa.resolveNode("form1.theForm.subForm3").presence= "visible";

xfa.resolveNode("form1.theForm.subForm4").presence= "invisible";

}

This is not working. The subforms are not working. I think that here if(this.rawValue ==1), the number, is the position of the list that i inserted in the drop down list object. Am i correct?

If someone can help i would apreciate.

I am also attaching the file.(I want to do in the dropdown list the same behavior of the checkboxes.)

Thanks.

Regards

Mancini.

5 Replies

Avatar

Former Community Member

to see what number refers to which drop down option.

select your drop down, in the properties Binding tab.

check "specify Item values" and you'll see it

good luck

Avatar

Former Community Member

HI,

But when i do this,

if(this.rawValue ==1) {

xfa.resolveNode("form1.theForm.subForm1").presence= "invisible";

xfa.resolveNode("form1.theForm.subForm2").presence= "visible";
}

else if(this.rawValue ==2){

xfa.resolveNode("form1.theForm.subForm3").presence= "visible";

xfa.resolveNode("form1.theForm.subForm4").presence= "invisible";

}

The subform doesn't work like i want.

Any help?

Avatar

Former Community Member

1. Is your JavaScript debugger turned on?

2. Is the form saved as dynamic?

Thanks!

-Tanya

Avatar

Former Community Member

Hi xrum,

my form is saved as dynamic.

How i turn on the javascript debugger?

Thanks

Avatar

Former Community Member

open your reader.

Edit - Preferences - javascript (on the left) - Enable Acrobat JavaScript(checkbox)

also make sure you have reader open when you preview your document in LiveCycle to see the errors. sometimes the window does not pop up if the reader is not open