Skip to main content
Known Participant
June 17, 2024
Answered

Icon Button needs to point to another field

  • June 17, 2024
  • 1 reply
  • 1082 views

I am creating a form where the end user has to upload an image. I am trying to customize it so that there is a masked PNG in front of the upload image form field so that when they upload an image instead of it being a square it will be masked out as a circle. 

 

So all I really need is a javascript that will make the "masked PNG" button point to the "Upload Image" form field so that the end user can upload their image.

 

Let me know if I need to provide anything.

This topic has been closed for replies.
Correct answer PDF Automation Station

Mouse up action:  this.getField("Button1").buttonImportIcon();

1 reply

PDF Automation Station
Community Expert
Community Expert
June 17, 2024

Create 2 buttons.  #1 is the image field.  Make it read only.  #2 contains an image with a transparent circle in the midde that is over #1.  It is the same size as #1 and also created 2nd so it is "on top" of #1.  Add a script to #2 that uploads the image to #1.

Known Participant
June 17, 2024

Yes, this is exactly what I have done. My only issue is what is the script that will upload the image to #1? sorry, I do not know much about javascript

PDF Automation Station
Community Expert
Community Expert
June 17, 2024

Mouse up action:  this.getField("Button1").buttonImportIcon();