Avatar

Level 10

Yes. For example, the attached form contains text fields and list box of accounts.

var customer = new Object();
customer.name = form1.page1.subform1.name.rawValue;
customer.address = form1.page1.subform1.address.rawValue;
customer.cty = form1.page1.subform1.city.rawValue;
customer.state = form1.page1.subform1.state.rawValue;
customer.accounts = new Array();

var accountCnt = form1.page1.subform1.accounts.length;
for (var i=0; i < accountCnt; i++) {
    customer.accounts[i] = form1.page1.subform1.accounts.getDisplayItem(i);
}

xfa.host.messageBox("The customer name is " + customer.name);
xfa.host.messageBox("The first account is " + customer.accounts[0]);