Best Practice for CActiveForm with validateOnSubmit AND ajax submit

Hi guys,

as far as I know combining validateOnSubmit and ajax submitting does not work out of the box (due to conflicting live bindings to the submit button). Can you confirm that for 1.1.10?

Therefore I would do something like that:

  1. set "validateOnSubmit" true (yii takes care for nice validation)

  2. writing callback for "afterValidate"

  3. In afterValidate using jQuery .serialize() (or similar plugin) to do the form post on my own

Is this the best I can do? Do you have a better idea? (beside doing validateOnChange instead of validateOnSubmit)

Looking forward to your answers!

Best Regards

Sebastian

:lol: great methods , it seems a smart way . thanks for sharing you experience with us .

can you elaborate on this solution? thx!