1 person found this helpful
1 person found this helpful
Thanks for your feedback. In my original posting, I indicated:
is created based on the code I enter into the GUI, e.g. form code, functions, etc. This also
I double-checked my thinking on this my doing the above and, as I expected, it generated a fragment of the XML (or, rather, pseudo-XML) structure. I created a function and the XML that was generated was appropriate for the function (and just the function). I presume I'd need to next create, for example, a button with actions associated with it perhaps followed by a text box, also with actions associated with it, in order to see the XML that's generated in each case (such as parameters like "MouseDown" and pseudo-XML tags like "AcroForm").
This has been the way Acrobat has worked since version 4. You can change the editor to any true text editor that does not add formatting codes, so it is possible to have a better editor program that can support multiple windows. One can also add document level code by importing another PDDF with the necessary scripts.
One can also have more than one function within a document level script. Functions can support required and optional parameters and return values. These features allow for the creation of flexible functions that can provide a wide range of results depending upon how well one can code some tool code.
To add code to form fields, you need to create the form field and locate the appropriate tab and enter the necessary code. This is safer than trying to add the necessary tagged code.
There are also ways to automate the generation of JS code or compute field names used the JS code so this combined with loop controls available to JS can result in some efficiency of coding when properly used along with some good document level functions.
If you have access to older versions or Acrobat, you could look at the source JS code that is used to provide the formatting, keystroke, validation, and simple computation routines.
For a simple example see:
For an example on how to join the pieces of a name to create an email address, full name and reversed name and automatically adjuting for missing data like a middle name. The document level scirpt was from a sample provided by Adobe with Acrobat version 4.
Thanks for the additional information.
Another approach I could follow would be to make a copy of the original source file and change the name of the copy to the desired destination file name, and then start modifying the code in the new (destination) file -- presuming that's the easiest path to get the desired functionality created. This way, I wouldn't have to manually (via the Acrobat GUI) create all of the <Document-Level> and <AcroForm> sections.
Thanks for your (and others') help, let me know if I'm missing anything.