• 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 one text field with information depending on selection from dropdown?

Community Beginner ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

Hi

 

I hope you can help me I have two fields. The first is called 'Bupa' and it has a Yes or No drop down options. If the user selects Yes I need another text field called 'Informed' to autopopulate with phrase 'Please inform Clare'.

Any suggestions?

Thanks in advance

TOPICS
Acrobat SDK and JavaScript

Views

607

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 1 Correct answer

Community Expert , Nov 12, 2020 Nov 12, 2020

In the "Informed" field as custom calculation script use this code:

event.value = this.getField("Bupa").valueAsString == "Yes" ? "Please inform Clare" : "";

Votes

Translate

Translate
Community Expert ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

In the "Informed" field as custom calculation script use this code:

event.value = this.getField("Bupa").valueAsString == "Yes" ? "Please inform Clare" : "";

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 Beginner ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

That perfect Nesa. Thank you soo much. Have a good day!

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 Beginner ,
Feb 18, 2023 Feb 18, 2023

Copy link to clipboard

Copied

Hi Nesa,

What if the second drop down selection for example is No, and I want to return a text that says "Inform Jack"?

How to link more than one argument selection? 

Best,

Dan

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 ,
Feb 19, 2023 Feb 19, 2023

Copy link to clipboard

Copied

@DanTheMan5871 is that argument linked to first dropdown or two are separated? Can you give an example?

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 Beginner ,
Feb 19, 2023 Feb 19, 2023

Copy link to clipboard

Copied

LATEST

Thank you Nesa,

You already answered me in my previouse post when you created a validation to link diffrent statements. 

Thank you so much. 

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