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

Auto-populate image with text field

New Here ,
Nov 12, 2018 Nov 12, 2018

Copy link to clipboard

Copied

How would you auto-populate an image with the conditional of a text field if the images are on the same document?

If you type A in text field 1 then an apple appears (image 1).  Is this possible?  How do I do this?

Thank you!

TOPICS
Acrobat SDK and JavaScript , Windows

Views

192

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
Community Expert ,
Nov 12, 2018 Nov 12, 2018

Copy link to clipboard

Copied

LATEST

You can set a button field to display an image. Then all you need to do is create two buttons, one for each image, and then show/hide them based on the value of the text field.

You can use something like this as the text field's custom validation script to achieve it:

this.getField("AppleImage").display = (event.value=="A") ? display.visible : display.hidden;

this.getField("BananaImage").display = (event.value=="B") ? display.visible : display.hidden;

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