Copy link to clipboard
Copied
We have updated Adobe DC pro to the most current version 15.023.20056 which introduced the 'Add an Image' field. However, we cannot seem to figure out how to remove the image if one was added by mistake without starting the entire form over. Is there a way to delete the image once it has been added?
You can do this with a little bit of JavaScript. Unfortunately when you run Doc.resetForm(), it will reset all form fields with the exception of image fields. The reason for this is that there is not really an image field. What is done here is that Acrobat adds a button field, sets some properties of that button field and then calls a JavaScript to import a button icon when the user clicks on the button. From that point on that button has an icon, and it does not matter if it was set by the desi
...Copy link to clipboard
Copied
In Form editing mode, click the Image with the Object selection tool (shown below) and hit Delete or Backspace on your keyboard.
Copy link to clipboard
Copied
Thanks for that reply.
However, we are making these forms for our clients to fill and return to us. They are not expected to have any other version of Adobe other than the free Adobe Reader program. Is there a way for them to remove an image added incorrectly or by mistake without having all of the tools available in the DC Pro version?
Copy link to clipboard
Copied
Also just to clarify, I'm looking for a way to remove the image only, not the entire image field. Thanks again.
Copy link to clipboard
Copied
You can do this with a little bit of JavaScript. Unfortunately when you run Doc.resetForm(), it will reset all form fields with the exception of image fields. The reason for this is that there is not really an image field. What is done here is that Acrobat adds a button field, sets some properties of that button field and then calls a JavaScript to import a button icon when the user clicks on the button. From that point on that button has an icon, and it does not matter if it was set by the designer of the form when it was originally created, or when the user clicked on the button - it's part of the button.
To change the icon (or reset it to nothing), you will have to copy a button icon from another button, and assign that to the button, and that will wipe out the image, and make it blank again.
Here is what you need to do: Add two buttons to the document, make one hidden and read-only (this way, nobody can interact with it), and name it "DummyButton". The second button should be labeled "Reset Image(s)" (depending on whether you want to reset just one or several images), and use the following script as the "Mouse Button Up" script:
this.getField("Image1").buttonSetIcon(this.getField("DummyButton").buttonGetIcon());
You of course need to change the "Image1" to reflect the name of your own image field.
Copy link to clipboard
Copied
Thank you!