Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Auto fill a textfield in subform

$
0
0

Ok, so I have this table on page 1 of a form.

 

I have a subform called Enrollment on page 4 of said form.

 

I add another instance of Enrollment for every row filled in on the table on page 1.

 

i.e. John Brown     Grade 4     Male

Jane Brown          Grade 5     Female

 

The student's name gets populated in the instance of Enrollment that is visible because there is always one student.

 

However, when I use scripting to create another instance of Enrollment, I can't get the student's names to populate(auto-fill) the names on the new instance of the subform Enrollment.

 

I have tried all this...

 

Enrollment.firstname[1].rawValue = first2.rawValue;

      Enrollment[1].middlename.rawValue = middle2.rawValue;

        oSubForm.lastname.rawValue = last2.rawValue;

 

oSubForm is calculated by...

var nIndex = 1;

var sSOM = "Enrollment[" + nIndex + "]";

var oSubform = xfa.resolveNode(sSOM);

 

I even tried xfa.resolveNode("Enrollment[1].lastname").rawValue

 

NOTHING is filling in the second subform fields. How do I get to them?

 

I can't see what they would be called because the instance of the form is generated on the fly by the dropdown!

 

Enrollment.instanceManager.addInstance(true);

 

I have searched and searched, but there is no definitive way I have seen to call these new fields.

 

Anyone?


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>