Cformmodel: Prevent Validating Field On Blur


One of my form created with CFormModel is validating each field on blur. How to stop validating fields on blur, I want to be field validated only on submit.

Here is my config for CFormModel:

$form = $this->beginWidget('CActiveForm', array(

	'id' => 'frmxyz',

	'action' => $app->createUrl('cont/act'),

	'enableClientValidation' => true,

	'enableAjaxValidation' => true,

	'clientOptions' => array(

    	'validateOnSubmit' => true,

    	'validateOnChange' => false,

    	'afterValidate' => new CJavaScriptExpression('function(a,b,c){ alert(a+"\\n"+b+"\\n"+c); return true;}')


	'htmlOptions' => array('class' => 'form', 'autocomplete' => 'off'),

	'clientOptions' => array('inputContainer' => ".control-group"),


You’re defining the clientOptions property twice and the second is overwriting the first. Try moving the inputContainer configuration into the first clientOptions array.

Oh no, How fool I’m


Thanks again Keith