I have to implement a specific behavior on page admin.php (to insert or update records) in Yii. Currently, when the user clicks the Save button, the application submits the page and makes the server side validations, reloading the page, showing the errors (if exists), or redirected to a search page, if the inclusion is performed successfully. What I need is that after validation, but before saving, the application do a search for a specific set of fields in the database and show a confirmation screen asking the user if he really wants to save that record or not, saving the record based on user response. I tried to implement this: http://www.yiiframework.com/forum/index.php/topic/37075-form-validation-with-ajaxsubmitbutton/ with the query to the database done through jquery, but it did not work for me because the custom validations were not executed and the application had a "NetworkError: 500". Besides, I do not want validations being made when the user exit or change each field, only on submit. My code was generated by Gii tool and I am using CActiveForm and $form->errorSummary($model) to show errors.