5 Replies Latest reply on Apr 14, 2016 1:13 AM by try67

    harvesting field properties in visual order

    Joel Cherney Most Valuable Participant

      My apologies in advance; I suspect this is not an Acrobat question but a "How do I write Javascript?" question.


      I have been trying to write a script to collect tooltips for translation, from a multipage Acrobat form. However, I am a pretty terrible scripter - I do more copy/pasting from forums than actual writing of code. I was using getNthFieldName to return all of the tooltips (userName) to the console, which I was able to do successfully. However, it returns them in alphabetical order according to the name of the field. This is not really useful to me; I would like to spit out the tooltips in some other order. Because of the way that my translator works here, I would very much like to spit them out to the console in visual top-down, left-right order. My research indicates that there is no published description of any way to alter the way that getNthFieldName returns values.


      How would someone do this? I'm kind of at a loss. I suspect that some kind of for loop using getField and returning the values to an array would work, but I'm not sure how to use getField to get all the fields. All of the examples I've found use something like getField("This is a field with a unique name in my document");