Not with a script. Maybe a plugin can do it.
I hope that a future version will have a 'getAction' method to complement the 'setAction' method. It would sure make analyzing a document much easier.
Here's a suggestion: When you make a field, create a hidden text field with
the same name+"Action" and paste the code into it.
Then if you want to get the code for field "abc" you do this:
code = this.getField("abcAction").valueAsString();
You can then manipulate the code and set it back to "abc" using setAction
and to "abcAction" using the value property.
However, the downfall is that if someone changes the code without changing
the value of abcAction (or the name of "abc"), you won't be able to know
Yeah, it's just a shame there's no getAction function. I'm limited due to the fact that it's 3rd party software which is modifying the PDF at a certain point so there's no way I can store it in a string or elsewhere.
Thanks for the suggestion, it's an interesting idea, but I think that with 30+ and even 50+ fields, this would easily become even more troublesome than the current situation.
And, unless I'm misunderstanding your suggestion, I'm not sure if it will help me if someone takes a field named 'Phone' and copies it and renames it 'First Name' - it will still contain all of the action settings and formatting settings that 'Phone' had, and since there wouldn't be a 'First NameAction' field, I still wouldn't be able to identify which fields are set improperly.