Highlighted

subform instance values

Avatar

25-06-2008

I have a form that has a button that creates a new instance of a subform on the current page and also creates a similar instance of subform on another page at the same time. Adding new instances works fine for both pages but removing the instances removes the current page but not the second page. Problem is with referencing the instances in the second page, i'd guess. I need to get the caption values from the first page instance and put them in the second page instance as well so being able to reference the instances is important. Is this doable or am I missing a basic rule of instances here?



** the values i am interested in getting are the object values within the instances--sorry, i realized that might lead to confusion.



figured it out:



var nIndex = this.parent.index;

var sSOM = "subform1.subform2.subform3.subform4[" + nIndex + "]";

var oSubform = xfa.resolveNode(sSOM);



oSubform.instanceManager.removeInstance(nIndex);