Hi friends,
I want some advise about the form.
One of my form is something like the following:
<form>
Name ___________
...
Mail #1 ___________ [Delete]
Mail #2 ___________ [Delete]
Mail #3 ___________ [Delete]
[Add]
...
</form>
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.