Auto-populate image with text field

New Here ,
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

92

Likes

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

Auto-populate image with text field

New Here ,
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

93

Likes

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
Nov 12, 2018 0
try67 LATEST
Most Valuable Participant ,
Nov 12, 2018

Copy link to clipboard

Copied

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;

Likes

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
Reply
Loading...
Nov 12, 2018 1