One of the most frequently asked question from the community is about the problems while trying to create so called dependent selects.

So there you could explore simple sample of this case and check the source code used.

After you select the produce type - the second select list will be populated and contains the items of this type. And if you change the type it will be updated again wih proper values.

Dynamic selects Demo