ActiveForm Field filtered list

Hi people

I have 3 tables

id_doccategory

  • id

  • name

id_doctype

  • id

  • id_doccategory -> foreignkey to id_doccategory->id

  • name

id_document

  • id

  • id_doctype -> foreignkey to id_doctype->id

The idea is to have document categories, document types that are of a specific category and documents that are of a specific document type

What i want is in the create/update document forms to be able to filter doctypes based on the selected category.

The user would choose the category and a ajax request would fill the doctype dropdownlist based on the category selected.

Any ideas on how to do this ?

Thanks in advance

I found some references to the onchange event in the dropdownlist control

I will give it a try

The answer was to use the ajax property of the category dropDownList in the documents view and use a specific documents controller action to return the updated listdata for the document category selected related types of documents

If anyone needs the code post here