Dependent Dropdown In Multimodelform

Hi Friends,

         I am a naive in yii framework. Recently I started using multimodelform extension but caught in serious problem. I am cloning three dropdown in multimodelform and the values of droppdown are dependent on each other. If I select a value in first dropdown, second dropdown must populate the corresponding values and the values of third drop must based on selection of second dropdown. I am not sure how to go about this in multimodel form. Please help  me.

The multimodelform extension can only handle simple form elements.

The problem is to handle/assign the jQuery/js functions after cloning, when jQuery based elements are used.

There exists no generally solution for this. You have to find out, what to do afterClone and you can use the js callbacks: jsAfterNewId or jsAfterCloneCallback to reassign/reinit/bind the jQuery functions to the new cloned element.

Take a look at documentation and the prepared js-code (afterNewId…) for some supported jQuery based elements (datepicker, autocomplete…)

If your form is too complex you cannot use multimodelform, you have to implement another solution (ajax…).

thanks for your reply joblo. when I use jsAfterCloneCallback function i can display all the id’s of cloned object. Please suggest me how to take a particular item and apply ajax on it