- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
For some reason, it does not work.
The rows in the table are not dynamic, there are 6 of them.
If they fill out the First Middle and Last names (called first1 for row 1, first2 for row 2...and so on) then the change event on the gender creates the instance of the form.
This is the code on row 1
var sNewSel = this.boundItem(xfa.event.newText);
switch (sNewSel)
{
case "1": // Female
Enrollment.firstname.rawValue = first1.rawValue;
Enrollment.middlename.rawValue = middle1.rawValue;
Enrollment.lastname.rawValue = last1.rawValue;
break;
case "2": // Male
Enrollment.firstname.rawValue = first1.rawValue;
Enrollment.middlename.rawValue = middle1.rawValue;
Enrollment.lastname.rawValue = last1.rawValue;
break;
default: // unknown value -- do nothing
Enrollment.firstname.rawValue = first1.rawValue;
Enrollment.middlename.rawValue = middle1.rawValue;
Enrollment.lastname.rawValue = last1.rawValue;
break;
}
For the gender drop down in row 2 I have this code...
var sNewSel = this.boundItem(xfa.event.newText);
switch (sNewSel)
{
case "1": // Female
Enrollment.instanceManager.addInstance(true);
Enrollment.firstname[1].rawValue = first2.rawValue;
Enrollment[1].middlename.rawValue = middle2.rawValue;
xfa.resolveNode("form1.Enrollment[1].lastname").rawValue = xfa.resolveNode("form1.#subform.Table1.Row1[1].last2").rawValue;
break;
case "2": // Male
Enrollment.instanceManager.addInstance(true);
break;
default: // unknown value -- do nothing
Enrollment.instanceManager.addInstance(false);
break;
}
As you can see, I have tried a lot of ways, however, none of the fields are populating.
What am I doing wrong?
Views
Replies
Total Likes