Copy link to clipboard
Copied
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?
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
Copy link to clipboard
Copied
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";}
Copy link to clipboard
Copied
THANK YOU! THIS HAS BEEN AWESOME!