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

Drop down to populate text field and image

New Here ,
May 09, 2023 May 09, 2023

Copy link to clipboard

Copied

I'm new to doing anything in Adobe other than just reading a pdf.. so I apologize. I've searched this forum and I've been able to get close to what I want but something just isn't working and I think it's my dumbness... haha

Ok here's what I'm trying to do. I'm making a form and I want to pick a town from the drop down and it populate a street address in a text field and populate an image of that address's signature at the bottom. Example: Selecting New York, NY in my drop down would auto fill 123 example st in the text field and my signature image will pop up... buthten if I select Los Angeles, Ca in the drop down the text box would change to 456 Hollywood Dr and my signature would hide and my friend's would become visible.  I've got it  up until I make a different selection and the now non selected signature doesn't return to hiding... so then I end up with both images visible... Help? please?

TOPICS
Acrobat SDK and JavaScript

Views

592

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 ,
May 09, 2023 May 09, 2023

Copy link to clipboard

Copied

You can use 'display' property to show/hide Image or a button fields depending on dropdown field value.

Let's say your image fields are called "Image1" and "Image2", as 'Validate' script of dropdown field you can use something like this:

this.getField("Image1").display = event.value == "New York" ? display.visible : display.hidden;
this.getField("Image2").display = event.value == "Los Angeles" ? display.visible : display.hidden;

Change "New York" and "Los Angeles" for actual dropdown values.

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
New Here ,
May 10, 2023 May 10, 2023

Copy link to clipboard

Copied

ok it is working for the first line. New york's image disappears when I select another option, but none of the other options' images are coming up.. 

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
New Here ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

Thisi s still an issue for me. Does anyone else have any advice?

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
Community Expert ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

Share 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
New Here ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

Unfortunatly I can't as it is for work and contains senstive information. 

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
Community Expert ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

LATEST

Can you post the script you used?

Check that field names are correct, and that dropdown options are same as in script.

Do you get any errors in 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