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

Display text field based on selection in two different dropdown lists

Community Beginner ,
Sep 28, 2017 Sep 28, 2017

In Acrobat, given two dropdown lists, one with 13 items and the other with 3, the user makes a single selection in each list. The result is to display a text field based on the unique combination of these two dropdown choices. My js skills are quite limited, but I assume there is a way to do that. Any help appreciated.

TOPICS
Acrobat SDK and JavaScript , Windows
3.0K
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

correct answers 1 Correct answer

Community Expert , Sep 28, 2017 Sep 28, 2017

Sure. You can use something like this as the custom calculation script of the text field:

var v1 = this.getField("Dropdown1").valueAsString;

var v2 = this.getField("Dropdown2").valueAsString;

if (v1=="Tom" && v2=="Smith") event.value = "Manager";

if (v1=="Tom" && v2=="Roberts") event.value = "Vice-President";

if (v1=="Jane" && v2=="Becker") event.value = "CEO";

if (v1=="Rodney" && v2=="Dangerfield") event.value = "Janitor";

// etc.

Translate
Community Expert ,
Sep 29, 2017 Sep 29, 2017
LATEST

Yeah, it's quite complex... I have quite a lot of experience with this kind of custom-made scripts, including for Templates, so if you're interested I could develop it for you, for a small fee. You can contact me privately (try6767 at gmail.com) to discuss it further.

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