• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Icon Button needs to point to another field

Explorer ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

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.

TOPICS
JavaScript , PDF forms

Views

150

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Enthusiast , Jun 17, 2024 Jun 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.

Votes

Translate

Translate
Enthusiast , Jun 17, 2024 Jun 17, 2024

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

Votes

Translate

Translate
Enthusiast ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

thank you, I tried this script but it does not do anything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

1.  Does "Button1" match the actual name of your button field?

2.  Is the layout of "Button1" set to Icon Only in the options tab?

3.  Are there any errors in the console?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 18, 2024 Jun 18, 2024

Copy link to clipboard

Copied

Yes, "Button1" matches the name of the button field and the layout is set to Icon Only but there are no errors. When i click on the image(button) nothing happens, the upload image does not appear.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 18, 2024 Jun 18, 2024

Copy link to clipboard

Copied

LATEST

Can you upload your file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines