Ajax Validation in Render Partial


(Rkdperil) #1

I generated a form, enabled the ajax validation and it works fine with I use ‘render’.

I want this form to be a part of another page,so I used renderPartial, the ajax validation is not working.

Tried couple of searches in the the forum and found no good solution. Any help will be appreciated. Thanks :slight_smile:


(Alirz23) #2

what error do you get?


(Rkdperil) #3

The fields are not getting validated on the fly if i do renderPartial. However it works fine if I use render.

There is no such error I get, just that the ajax validation is not working.


(Abennouna) #4

Use it like this:


$this->renderPartial('yourView', array(), false, true);

From http://www.yiiframework.com/doc/api/1.1/CController#renderPartial-detail:


(Vijay Choudhary) #5