Copy link to clipboard
Copied
I would like to know a Script that can make a normal text balloon disappear and appear based on the image selection through an "ImportIcon". I want that, when he selects an image, whatever it is, the "Text1" field is hidden, and when this image is out, it is visible.
Copy link to clipboard
Copied
We have had several similar discussions where Java Script was used to perform a similar task. Please go through this discussion and see if it could be helpful.
https://community.adobe.com/t5/acrobat-discussions/javascript-to-hide-show-text-field/m-p/11744572
Thanks,
Akanchha
Copy link to clipboard
Copied
I'm sorry, but they didn't help at all. I wanted one. Code that manages to hide a field based on whether an icon is selected or not. Example: we have the field "Text" and "IMG". If the "IMG" contains any icon or image, whatever it may be, the "Text" field will have to be hidden; if not, it is visible.
Copy link to clipboard
Copied
These codes, the way I've seen it, tried it and tried to improve it, just make the balloon disappear. It doesn't "read" whether or not it has an image to define the state of the "Text" balloon.
Copy link to clipboard
Copied
test this,:
//Check if an image is inserted
var buttonIcon = this.getField("Bild einfügen").buttonGetIcon();
try {
var buttonIconStream = util.iconStreamFromIcon(buttonIcon);
;
} catch (e) {
app.alert("Sie haben kein Bild hochgeladen");
}
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more