Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nimblehq/bootstrap-ajax-form
Validate & Process Bootstrap Forms with Ajax
https://github.com/nimblehq/bootstrap-ajax-form
javascript jquery
Last synced: about 11 hours ago
JSON representation
Validate & Process Bootstrap Forms with Ajax
- Host: GitHub
- URL: https://github.com/nimblehq/bootstrap-ajax-form
- Owner: nimblehq
- License: mit
- Created: 2014-05-26T15:06:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-26T15:14:22.000Z (over 10 years ago)
- Last Synced: 2023-03-22T19:12:08.859Z (over 1 year ago)
- Topics: javascript, jquery
- Language: JavaScript
- Size: 141 KB
- Stars: 1
- Watchers: 55
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Validate & Process Bootstrap Forms with Ajax
======This jQuery Plugin provides the following benefits:
- Leverage built-in styling helpers provided by Bootstrap to show validations with a beautiful UI
- Process any form type, even file uploads, with jQuery $.ajax. This feature only when the FormData API is available.## Documentation
The jQuery plugin comes with the following options:
`animation` String: disable (default) | slideUp
Behaviour of the form while the Ajax request is being processed. With `animation:'disable'`, all input fields are disabled until the Ajax is completed. While with `animation:'slideUP'`, the form is hidden using the built-in jQuery animation `slideUp`
`autoReset` Boolean: false (default)
`autoResetDelay` Integer: 5000 (default)Option to reset the form to its initial state upon failure of the Ajax request after a specific delay
`onAjaxAlways: ''` Function: null (default)
Custom callback fired when the jQuery Deferred is resolved or rejected
`onAjaxSuccess: ''` Function: null (default)
Custom callback fired when the jQuery Deferred is resolved
`onAjaxError: ''` Function: null (default)
Custom callback fired when the jQuery Deferred is rejected
## How to use
Bind the plugin to a form using the following syntax:
$('#contactForm').n3AjaxBootStrapForm({
animation: 'disable',
autoReset: true,
onAjaxSuccess: function(){
console.log('The form has been processed successfully');
}
});