These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Capturing/duplicating values from previous fields

solarecity
Registered: Jun 16 2007
Posts: 4

I am using Acrobat 8/LiveCycle Designer.
 
How do I get fields on one page to capture values from fields on a previous page. In this case the form is named HDContract and on Page1 there is a text field named CustName and a calculated numeric field named Total.
 
How do I set fields on a subsequent page to capture the values from those two fields automatically?
 
So far I am at a loss.

My Product Information:
Acrobat Pro 8, Windows
pddesigner
Registered: Jul 9 2006
Posts: 858
Try this code. If it's not what you want, go to the Adobe web site and type in the key word JavaScript. You want download the new Acrobat 8 Javascript Guide.


The following code lists all properties of a field. This technique can be used to programmatically duplicate a field.

f = this.getField("myField");
for ( var i in f ) {
try {
if ( typeof f[i] != "function" ) // remove a field methods
console.println( i + ":" + f[i] )
} catch(e) {} // an exception occurs when we get a property that
}// does not apply to this field type.

My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.

solarecity
Registered: Jun 16 2007
Posts: 4
Thanks for the reply, Eugene.

I was kind of hoping for a real example of what the documentation describes. It looks like this is cut and pasted from documentation but still leaves me trying to figure out what is what and what goes where. I really do not have time to become a Javascript programmer at this point (lack of time, not lack of ability – I do write PHP code at times). Also, the lines are broken up in such a way as to be confusing. The italics are also confusing and I am not sure what is intended as script and what is comment.

Is this the correct syntax and does it go, as is, in the script editor window?
f = this.getField("CustName")

Could you just give me your recommendation on exactly what should go into the script editor window if I am trying to duplicate field CustName on Page1 into a field on Page2 of form HDContract?

Thank you,

Rick