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

Multiple values for drop down list in various text boxes

New Here ,
Sep 29, 2021 Sep 29, 2021

Hello all,

I am attempting to have mulitple text boxes auto populated with variations of a value from a drop down menu. My current issue is I cannot figure out how to assign an abriviated value to each of the drop down menu items. Attempting to use the export value won't work since it changes the output text in all the text boxes I am using that are tied to the drop down menu. I found a script here that I thought might work but I am not getting the result I desire and I can't figure out what I need to change to make it work, I'm sure it's something simple. Below is the script I am using.

 

var e=this.getField("drop down menu name").value AsString; 

if(e="drop down menu item #1")

{

event.value="abbriviation of menu item #1"; 

}

if(e="drop down menue item #2")

{

event.value="abbriviation of menu item #2";

}

 

The outcome with the above scrpit is it always populates with the abbriviation of item #2, even when item #1 is initially selected from the drop down menu. Any help with this would be greatly appriciated. 

TOPICS
Edit and convert PDFs , JavaScript , PDF forms
711
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
1 ACCEPTED SOLUTION
Community Expert ,
Sep 29, 2021 Sep 29, 2021

To compare values use ==, not only =

View solution in original post

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
Community Expert ,
Sep 29, 2021 Sep 29, 2021

To compare values use ==, not only =

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
New Here ,
Sep 29, 2021 Sep 29, 2021

Do I change all = to ==?

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
Community Expert ,
Sep 29, 2021 Sep 29, 2021

Only where you compare values. Not where you set values. 

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
New Here ,
Sep 30, 2021 Sep 30, 2021
LATEST

Great, got it! Thank you for your assistance. I greatly appriciate it. 

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