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

If no logo is uploaded, how do I make the image box (icon) not print?

New Here ,
May 22, 2018 May 22, 2018

I have and editable PDF with text fields and an image field. I have a custom icon in the image field so end-users know where to click to upload their own image. If they do NOT upload an image the icon still prints. How do I change it so the icon will not print if they upload an image? Thanks!

TOPICS
PDF forms
741
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
May 22, 2018 May 22, 2018

You can't interact with a hidden field. Set it as "visible but doesn't print" and use this code as its MouseUp script

if (event.target.buttonImportIcon()==0) event.target.display = display.visible;

View solution in original post

Translate
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
LEGEND ,
May 22, 2018 May 22, 2018

I would set the display property for the image field to "display no print". This should be available on the field's property pop-up window.

Translate
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
Community Expert ,
May 22, 2018 May 22, 2018

But then it won't print even if the user selected an image... You would need to adjust the code that imports the image to also change the field's display property.

Translate
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
New Here ,
May 22, 2018 May 22, 2018

I even tried "Hidden but Printable" but there's nothing there to click to upload and image. I don't even see a finger/hand when I roll over it that there's a field there. The only thing that I found that works is to use the default icon only and not use a custom design icon. But I really want my little "place image here" custom icon...

Translate
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
Community Expert ,
May 22, 2018 May 22, 2018

You can't interact with a hidden field. Set it as "visible but doesn't print" and use this code as its MouseUp script

if (event.target.buttonImportIcon()==0) event.target.display = display.visible;

Translate
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
New Here ,
May 22, 2018 May 22, 2018
LATEST

YES!!!!!! Thank you! That worked! I combined your code with another I found to make the stroke and fill transparent as well. This is what I used and it's perfect!!

  1. if (event.target.buttonImportIcon()==0) { 
  2.     event.target.lineWidth = 0; 
  3.     event.target.strokeColor = color.transparent; 
  4.     event.target.fillColor = color.transparent; 
  5.     event.target.display = display.visible  
  6. }
Translate
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