One of the form samples with Acrobat 8 includes a text field whose value is the concatenation of several fields from the XML data source. A script is added to the ready:form event that looks like this:
this.rawValue = $record.invoice.area.contactName.value + '\u000a' +
$record.invoice.area.areaName.value + '\u000a' +
$record.invoice.area.address.value + '\u000a' +
$record.invoice.area.city.value + ', ' +
$record.invoice.area.stateProv.value + ' ' +
$record.invoice.area.zipCode.value + '\u000a' +
$record.invoice.area.country.value;
Of course, the sample data file has only one record in it and the above script works fine. However, if another record is added to the data, the concatenated value does not change. So the first contact's name and address show on all pages of the form.
How can I get the value in this text field to change on each page?
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script