Clientside Validation Not Submitting Form After Validation

Hi, i am implementing clientside form validation. But the problem is it is not submitting form after validation. It works fine if any error occurs but if there is no error in form validation then it does not submit form. please guide me where i am wrong





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

			'id'=>'comingsoon-csoon-form',

			'enableAjaxValidation'=>true,

                	'enableClientValidation'=>true,

                	'clientOptions'=>array('validateOnSubmit'=>TRUE, 

                        'validateOnChange'=>true, 

                        'afterValidate'=>"js:function(form, data, hasError) {

			            

                	if(hasError == true){						

			     if( $('.result').is(':hidden') )

				 $('.result').slideDown();

			         return false;

			     }

			else{						

			     //alert('else');						

                             return true;

			}

                    }")

		        )); 

                ?>






is there anyone on YII forum who can help me??

Please help me, i am unable to understand what is the problem here. Just give me some hint ???

What i am trying to do is, i am validating form via ajax and if any error occurs then i will show error in a popup and apply error class on text fields. after successful validation , i am hiding the error popup and applying success class on textfields.

Everything is working fine but form is not being sent. please help me what is wrong in this code or suggest me a better solution to do this.

Try disabling ajax validation and see if a valid form will submit.

Matt

Hi,

Please see it…

http://www.yiiframework.com/forum/index.php/topic/43977-ajax-client-side-validation-without-refreshing-page/page__p__208536__fromsearch__1#entry208536