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

Equal Script

krickett47
Registered: Feb 4 2010
Posts: 18

This is probably very basic, but what is the code to have one field equal a different field. Example, I want the value to field 218 to carry over to field 263. Many thanks!

My Product Information:
Acrobat Standard 9.1, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi krickett47,

Rename field 263 to the same name as field 218. Fields with the same name will populate with the same value.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
krickett47
Registered: Feb 4 2010
Posts: 18
Thank you so much. I knew it was basic, and I also knew that fields with same name contained the same information. Just slow, this morning. Thanks again!
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
There are a couple of options, but first you should Read some of the tutorials here:
[url=http://www.acrobatusers.com/tutorials/2006/scripts_form_fields]Entering scripts for form fields[/url] by Thom Parker
[url=http://www.acrobatusers.com/tutorials/2006/form_calculations]How to do (not so simple) form calculations] by Thom Parker

For the 'Calculation' tab for 'field263':
1. You can use the "The value is the [u]sum(+)[/u] of" and select the 'field218'.
2. You can use the "Simplified Field Notation" and etnter the field name 'field218'.
3. You can use the "Custom Calculation Script' with the following code:
ent.value = ( this.getField("field218").value;
You may also want to get and look at the [url=http://www.adobe.com/devnet/acrobat/javascript.php]Adbobe JavaScript documentation[/url] and [url=https://developer.mozilla.org/En/JavaScriptdocumentation]Mozilla JavaScript 1.5[/url] documentation.

George Kaiser