So, when i trying to set ‘afterValidate’ option and pass my functionName
<script type="text/javascript">
function formSend(form, data, hasError)
{
alert(hasError);
}
</script>
<?php $form=$this->beginWidget('CActiveForm',array(
'enableAjaxValidation'=>true,
'id'=>'contact-form',
'clientOptions'=>array(
'validateOnSubmit'=>true,
'afterValidate'=>'formSend'
)
)); ?>
yii output
$('#contact-form').yiiactiveform({'validateOnSubmit':true,'afterValidate':'formSend','attributes':[{'inputID':'ContactForm_name','errorID':'ContactForm_name_em_'},{'inputID':'ContactForm_email','errorID':'ContactForm_email_em_'},{'inputID':'ContactForm_subject','errorID':'ContactForm_subject_em_'},{'inputID':'ContactForm_body','errorID':'ContactForm_body_em_'}]});
functionName is in quotes, anybody can help?