ErrorSummary for multiformmodel

I am using a multi form model. A $model array is passed to the view and for each model object I am trying to have an errorsummary. See the code below.


 

foreach ($model as $f=>$edu):

 echo $form->errorSummary($edu,''); 

 echo $form->textField($edu,"[$f]schoolname",array('size'=>30,'maxlength'=>128));


endforeach;



When I submit the form an error summary for only one form is displayed. Any ideas.

[url="http://www.yiiframework.com/doc/api/1.1/CActiveForm#errorSummary-detail"]errorSummary/url accepts a array of models. so… i think this way will works:


echo $form->errorSummary($model);


foreach ($model as $f=>$edu):

 echo $form->textField($edu,"[$f]schoolname",array('size'=>30,'maxlength'=>128));


endforeach;

I tried it. But still it is not working.

Hello,

I kind of have a same problem. Parts of my form are loaded with ajax call which adds new model instances to form dynamically. Part of for which is not loaded using ajax displays the error, part which is loaded using ajax doesn’t… any ideas?