So you’ve read my previous post about “AcroForm Objects”:http://blogs.adobe.com/formbuilder/2006/06/acroform_objects.html and now you’re wondering what you do with that stuff. Those more adventurous might even have tried to use the _event.target.getField_ method to do something cool.
If you’re going to do things on the application or the document without attempting to affect a specific field, it’s pretty straight-forward: You just call methods on the _app_ (Acrobat Application) or _event.target_ (Acrobat Document) objects. Getting an AcroForm Field object, however, isn’t as simple as you may think because of the naming conventions used when the Acrobat Form objects are created, based on the XFA Form objects.
Let’s say you have a field, named “MyField”, parented to the second page, named “Page2”, of your form, named “form1”. For some reason, you need to access that field’s pertaining AcroForm Field object. If you tried
you wouldn’t get very far because the actual name of the field is:
Basically, each AcroForm Field object is named with a _verbose_ form of the “XFA SOM Expression”:http://blogs.adobe.com/formbuilder/2006/06/som_expression_generator.html of its pertaining XFA Form object (also known as a *Fully-Qualified SOM Expression*).