Copy link to clipboard
Copied
We have created several image insertion fields in the form.
In this field can insert own "Icon".
And it can set the "Label Name".
These can be displayed in the image insertion field.
I want to manipulate this "Icon Label Name" with Javascript.
Please be attention. It's not "Field Name".
This means that this field has a "Field Name", "Inserted Icon", and "Inserted Icon's Label Name".
What I want to manipulate is "Inserted Icon's Label Name".
I don't know how to do this.
Nowhere can I find a way.
"Field name" can be obtained in the following ways.
---
var Peace01 = this.getField("Peace_01");
var Peace01label = Peace01.name;
event.value = Peace01label;
---
I tried the following, thinking that maybe I should rewrite the second line, but all returned an error.
var Peace01label = Peace01.label;
var Peace01label = Peace01.labelName;
var Peace01label = Peace01.note;
var Peace01label = Peace01.tag;
var Peace01label = Peace01.id;
var Peace01label = Peace01.caption; so on...
I can't find any reference materials anywhere, so I tried all the words that came up....
I want to also rewrite as well as get, but I do not know at all.
Please help me ..
You would gain a lot by reading the Acobat JavaScript Refence, rather then guessing at PDF object properties.
You can also learn a great deal about scripting Acrobat and PDFs here:
https://www.pdfscripting.com/public/main.cfm
I believe that what you are calling an "Image insertion field" is really a button field.
The label for a button field can be obt
...Copy link to clipboard
Copied
You would gain a lot by reading the Acobat JavaScript Refence, rather then guessing at PDF object properties.
You can also learn a great deal about scripting Acrobat and PDFs here:
https://www.pdfscripting.com/public/main.cfm
I believe that what you are calling an "Image insertion field" is really a button field.
The label for a button field can be obtained with this script
field.buttonGetCaption();
where "field" is the field object. Look it up in the reference.