The current requirement is to execute a function after all models in the form have passed validation, for subsequent processing operations!beginWidget(‘CActiveForm’, array( ‘id’ => ‘question_order-_form-form’, ‘enableAjaxValidation’ => true, ‘enableClientValidation’ => true, ‘clientOptions’ => array( ‘validateOnSubmit’ => true, ‘afterValidate’ => ‘js:submit_checkout’, ), ‘htmlOptions’ => array( ‘autocomplete’ => ‘off’ ) )); ?>function submit_checkout(form, data, hasError) {
The actual rules for the JS function are:
if (hasError == false) {
return false;
} else {
return true; // Returning true will continue executing the form submission operation!
}