Hi

I've done quite a bit of reading about the following but still haven't found the best way to do the following

In my custom module I have a drop down containing a list, when a user selects an item from that list I want it to go and get a list of records from the database associated with the record selected in the first drop down, and then display a second drop down with the results.

What is the best way to do this please using forms, can anyone point me at an example please

Many Thanks

Comments

Jaypan’s picture

This is done using the #ajax of the Form API. There is an example in the Examples module.