Revision #4 has been created by Antonio Ramirez on Nov 3, 2014, 11:17:27 AM with the memo:
Changed API
« previous (#3) next (#9) »
Changes
Title
unchanged
How to implement form events
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
yii2, forms, how to
Content
changed
[...]
```php
<?php
$js = <<<JS
// get the form id and set the event
$('form#{$model->formName()}').on('beforeSubmit', function(e, \$form) {) {
var \$form = $(this);
// do whatever here, see the parameter \$form?
// is a jQuery Element to your form
}).on('submit', function(e){
e.preventDefault();
});[...]