Yii - Using Ajax Validation -


i'm trying enable ajax validation in form, i've added right parameters form, it's not working, here's code:

<?php $form=$this->beginwidget('cactiveform', array(     'id'=>'user-form',     'enableajaxvalidation'=>true,     'htmloptions' => array(             'enctype' => 'multipart/form-data',             'enableclientvalidation'=>true     ), )); ?> 

please advice.

in top of action, add following lines:

if(isset($_post['ajax']) && $_post['ajax']==='user-form'){     echo cactiveform::validate($model);     yii::app()->end(); } 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -