hi, jquery.yiiactiveform.js not inlcuded in header and ajax validation not working. how to solve this.
i have removed <?php echo $form->error($model,‘user_id’); ?>
hi, jquery.yiiactiveform.js not inlcuded in header and ajax validation not working. how to solve this.
i have removed <?php echo $form->error($model,‘user_id’); ?>
You need to leave the error() call for the validation to work… if you don’t want to show the error message than just set the hideErrorMessage to true - http://www.yiiframework.com/doc/api/1.1/CActiveForm#error-detail
<?php
$form = $this->beginWidget('CActiveForm', array(
'id' => 'pupil-form',
'enableAjaxValidation' => true,
'clientOptions' => array(
'validateOnSubmit' => true,
),
'htmlOptions' => array('hideErrorMessage' => true)
));
?>
Is this correct, its showing the error message. Sorry m a newbie.
I have given you the link to the documentation… this should be in the error() call not in the beginWidget() call
thanks a lot… that worked…
HI, can we focus the first error field or move to error summary div on error…