Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Create a drop down list that populates based on the selection form another drop down list.

Avatar

Level 2

I need to set up a drop down list that is popualated (i.e. displays a certain list of selctions in the drop down list) based on the choise the form user selects in an adjacent List

For example

There are two drop down list field sitting side by side in the form

1. Select State          2. Select Course

What I want to do is have a list of states in the first drop down list (1.Select State) and depending on which state the form user selects , the second drop down list (2.Select Course) will populate with a selction of courses available in that selected state only (i.e. it will on;y show course available in QLD if QLD is selcted).

Is this hard to do?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You can also use the dropdown's preOpen event, to look back at previous selections in other objects and populate the dropdown list accordingly: http://assure.ly/jcTahK

Good luck,

Niall

View solution in original post

9 Replies

Avatar

Level 9

Hi,

Here is a form for you. Look for the scripts in the change event of Dropdowns.

https://acrobat.com/#d=oE5bec4D5UqEbuKvxugZOA

Thanks,

Bibhu.

Avatar

Level 2

Hello Bibhu

Thanks for your quick response.  Unfortunately when I click on your link it takes me to a blank page (which I think is in Adobe Connect)

Avatar

Level 2

Actually it has now opened

Cheers

Avatar

Correct answer by
Level 10

Hi,

You can also use the dropdown's preOpen event, to look back at previous selections in other objects and populate the dropdown list accordingly: http://assure.ly/jcTahK

Good luck,

Niall

Avatar

Level 2

I can see the area in the script you are referring to but when I change the values to see how it works I get an error message when it tries to save which state that "does not have xmlns is cache.... this may be becuase I am using version 8 perhaps?

Avatar

Level 2

Will look at your second option

Cheers

Avatar

Level 1

I have similar situation (like the above problem where a user select a state and the 2nd list populates all the cities for that state) but instead of using Javascript and static data from the list I need to retrieve the data from a db not from a static list of Javascript.

Does that make any sense?  I know it can be done using Javascript and static data, but my data will have more data to be added later to the db.

I was able to test out fine using the recordsets and filter, but when implemented onto a form, the 2nd list didn't get populate.

Any ideas/suggestions will gladly be happy.  Thnx

Avatar

Level 1

Can you update this link?   I really would like to see your sample form, too.   Thanks!