Problem With Enableajaxvalidation Cform

[size="3"]I have a form ( CActiveForm ) on which enableAjaxValidation is true.

All it works fine but please tell me which which events are called wh[size="3"]i[size="3"]le performing AjaxValidation.[/size][/size]

Because i have to catch some thing before saving a record , and i have coded for this scenario inside the onBeforeSave() function.

In the form I have about 10 data fields , so as Ajax validation is true , every time it validates every input it calls the onBeforeSave() event also.

How to avoid the ajax validation to hit the onBeforeSave() function or is there any other event which i may call , which should work on before saving and should not be called on Ajax Validation.

[/size]

[size="3"][size="3"][size="3"]p[size="3"]ing me if there[size="3"] is any confusi[size="3"]on to [size="3"]understand the ques[size="3"]tion[/size][/size][/size][/size][/size][/size][/size]

Thanks Yii

[size="3"][size="3"][size="3"][size="3"] [/size][/size][/size][/size]

[/size]

[color="#006400"]/* Moved from Feature Requests to General Discussion … */[/color]

Hi Barki,

I think it doesn’t happen usually.

When doing ajax validation by CActiveForm::validate(), the model won’t be saved and hence onBeforeSave won’t be called.

How do you call ajax validation in the controller method?