I’m using Yii framework in one of my projects and I would like to use the jQuery Form plugin together with Yii client-side built-in validation.
I can’t get them work together. If I setup jQuery form plugin with this simple js code:
$('#myform-id').ajaxForm();
the client-side validation is performed but it doesn’t stop the form submission even if the validation fails. I suppose that this is related to the fact that both Yii client-side validation library and jQuery form plugin bind the same “submit” event on the form.
FYI, I double checked that there no js errors with FireBug and Chrome console.
I wonder if someone experienced the same issue and solved that someway.
I solved this way:
Yii Active Form init code:
And in the same page I’ve added this js code to submit the form via jquery form plugin: