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

AUTO POPULATING TEXT IN FEILDS RELATIVE TO A DROPDOWN SELECTION

Community Beginner ,
Mar 17, 2022 Mar 17, 2022

Hello. I am trying to create a dropdown with about ten selections, then with that selection, make data relative to that
specific selection auto populate in separate fields.
For example, If I create a dropdown and I select "home" from my dropdown, I want my street address to populate in
the next field, the city in the field after, and so on with the state and zip code. If I were to select "work", I would want
my work address to auto populate in the next several fields.
For clarification, I know how to create the dropdown with the selections, I just can not figure out how to get the
relative information for each selection in the dropdown to auto populate.
If I select "HOME" from the dropdown, what do I need to do to get "123 Anywhere St" to populate in the
ADDRESS field, "New York" in the CITY, "New York" in the STATE, and 55555 in the ZIP fields?

TOPICS
Windows
998
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 , Mar 17, 2022 Mar 17, 2022

First make sure 'Commit selected value iimmediately' is selected in dropdown field -> options tab and make sure you use "HOME" or "home" because it's case sensitive.

Use like this as 'Validation' script of dropdown field, just add more of 'else if' for other choices:

if(event.value == "HOME"){
this.getField("ADDRESS").value = "123 Anywhere St";
this.getField("CITY").value = "New York";
this.getField("STATE").value = "New York";
this.getField("ZIP").value = "55555";}
else if(event.value == "WORK"){
thi

...
Translate
Community Expert ,
Mar 17, 2022 Mar 17, 2022

First make sure 'Commit selected value iimmediately' is selected in dropdown field -> options tab and make sure you use "HOME" or "home" because it's case sensitive.

Use like this as 'Validation' script of dropdown field, just add more of 'else if' for other choices:

if(event.value == "HOME"){
this.getField("ADDRESS").value = "123 Anywhere St";
this.getField("CITY").value = "New York";
this.getField("STATE").value = "New York";
this.getField("ZIP").value = "55555";}
else if(event.value == "WORK"){
this.getField("ADDRESS").value = "999 Anywhere St";
this.getField("CITY").value = "Los Angeles";
this.getField("STATE").value = "California";
this.getField("ZIP").value = "77777";}

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 Beginner ,
Mar 18, 2022 Mar 18, 2022
LATEST

THANK YOU! THIS HAS BEEN AWESOME!

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