readme...
This commit is contained in:
parent
1204c60557
commit
73e94d4cf7
1 changed files with 16 additions and 0 deletions
16
README.md
16
README.md
|
@ -144,6 +144,22 @@ Callback that runs when the form is submitted.
|
|||
- **invalid:** The number of invalid fields if any.
|
||||
- **event:** The submit event (prevented by default).
|
||||
|
||||
For Example:
|
||||
|
||||
```javascript
|
||||
$('form').idealforms({
|
||||
onSubmit: function(invalid) {
|
||||
if (invalid) {
|
||||
alert(invalid +' fields!');
|
||||
} else {
|
||||
$.post('save.php', this.$form.serialize(), function(response) {
|
||||
// do something with response
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### rules
|
||||
|
||||
Field rules. See [Adding Rules](#adding-rules).
|
||||
|
|
Loading…
Reference in a new issue