Avatar

Level 2

hi i have a form that has several nested subforms in it (mainForm > subForm1 (mainForm.subForm1) > subForm2 (mainForm.subForm1.subForm2) > subForm3 (mainForm.subForm1.subForm2.subForm3)).

In each subform there is a drop down list object than when you select an item it dislays a sub form, the first level works without issue (javascript:change, for the drop down list) i.e.

mainForm1.DropList::change - (Javascript, client)

var newValueA = this.boundItem(xfa.event.newText);

switch (newValueA){

case "1";

mainForm1.subForm1.presence = visible;

case "2"

mainForm1.subForm1.presence = hidden:

}

however when in the next sub form (subform1) which is set to be either hidden or visible above:

mainForm1.subForm1.DropList::change - (Javascript, client)

var newValueA = this.boundItem(xfa.event.newText);

switch (newValueA){

case "1";

mainForm1.subForm1.subForm2.presence = visible;

case "2"

mainForm1.subForm1.subForm2.presence = hidden:

}

nothing happens and when i debug using the javascript debugger i get: invalid assignment left handside.

Is it not possible to have 3-4 subforms deep that display or are hidden depending on user input? or am I using the wrong code to reference to this dynamic appearing sub form?

any ideas would be fantastic,

Keith