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

Form Data Events

keunsun
Registered: Dec 21 2006
Posts: 2

I need to be able to concatenate text entered into two text fields on one part of a form into a single text field in another part of a form.

My Product Information:
Acrobat Pro 6, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You do this just like your're adding two numbers.

Enter code similar to this into the Calculation event of the result field

event.value = this.getField("Text1").value + this.getField("Text2").value;Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://partners.adobe.com/public/developer/en/acrobat/sdk/
pdf/javascript/AcroJS.pdf]Acrobat JavaScript Reference[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The code above is JavaScript for an AcroForm. For a LiveCycle document you would use this code in the calculation script, JavaScript of course

Text1.rawValue + Text2.rawValue;

That's it.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

iconiks
Registered: Oct 16 2007
Posts: 3
o.k. ... total novice when it comes to the more advanced aspects of PDF form design. I need to accomplish this same function and need to know if this is formCalc or Javascript? Looks more like JS to me, but when I use that option, I'm getting no results. When I try formCalc, I'm getting a syntax error message. Any clarification help for this total noob would be appreciated!