Ajax Renderpartial And Ajax Validation

Hi friends,

I want some advise about the form.

One of my form is something like the following:


    Name    ___________


    Mail #1 ___________ [Delete]

    Mail #2 ___________ [Delete]

    Mail #3 ___________ [Delete]




The main model is "Person", and "Person" has many "Mail"s.

[Add] and [Delete] are the ajax links to add/delete mails, so that the user can add/delete mails on the fly.

The main part of the form (eg. Person’s Name) is constructed using CActiveForm, enabling ajax validation and client validation.

But the part of the mail addresses is constructed using CHtml::something. I renderPartial it without using CActiveForm, because I have to respond to the ajax requests to add/remove mail addresses in other actions than the main action.

The form works quite nice except for one thing … that is, I couldn’t enable the on-the-fly ajax validation on change event for the mail addresses. (I could managed to enable the ajax validation for them on submit event somehow.)

So, I’d like to know how are you dealing with this. Any hint will be appreciated.


I do have exactly this same issue, as expressed here:


It seems that we can’t pull this off at the moment.

If, in the meanwhile I could found something with the help of others Yii developers, I will sure let you, and other, know about a possible viable, workaround.