Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
93f8d7e
add form project
Jan 26, 2009
703d4a9
Fix bug in Opera hack.
Feb 1, 2009
69e561f
Fixed issue with inputs named 'action', 'method', and 'target'.
Feb 3, 2009
e27264e
fix unit test failure on IE8
Feb 3, 2009
7b13593
improve Opera hack (hat tip to Ben Ogle)
Feb 6, 2009
d21ddfd
remove all $.browser usage
Feb 7, 2009
e52ed46
Roll out document.write in iframe src. use about:blank instead.
Feb 9, 2009
032377d
Fixed bug in url assignment - hashes now stripped.
Mar 9, 2009
c7f94a6
Fix regEx in hash cleanup.
Mar 10, 2009
a47d3c6
add missing semi-colons.
Mar 11, 2009
8f8b414
Fix bug when used with jQuery.noConflict(true)
Apr 8, 2009
7845507
Handle hashed and naked hash actions.
May 9, 2009
a9c8862
Fix bug with image inputs (value not submitted).
May 10, 2009
87b8067
Better handling for Opera's slow iframe readiness, as reported here: …
Sep 6, 2009
6346045
add missing semicolon
Sep 9, 2009
15932c2
v2.32 - bug fix; response not handled correctly when file upload retu…
Sep 17, 2009
b3e4892
- now using event delegation for click events
Sep 26, 2009
8114b37
v2.34 - fix for elements within a submit button.
Nov 5, 2009
ce43241
v2.35 - added iframeSrc option and defaulted iframe option to true if…
Nov 6, 2009
947f03f
v2.36 - remove extra comma in options setup
Nov 7, 2009
b512b81
updated success callback for jQuery 1.4+
malsup Feb 13, 2010
bebf9b0
v2.38 - add 'forceSync' option
malsup Feb 14, 2010
ab23940
iframe load fix (mostly for Opera)
malsup Feb 20, 2010
7a59772
- increase dom wait time for file uploads
malsup Feb 26, 2010
6b05c27
- more logging
malsup Feb 27, 2010
c993793
v2.41 - fix misnamed var in 'extraData' logic
malsup Mar 12, 2010
1f9901a
v2.43 - added 'replaceTarget' option
malsup Mar 12, 2010
6da6cb0
numerous changes based on multiple pull requests
malsup Aug 8, 2010
a43306c
cleanup
malsup Aug 8, 2010
e8478fc
more cleanup nits
malsup Aug 8, 2010
8e1056f
Fix 'opts' var usage.
malsup Aug 9, 2010
b49dfb4
bump version
malsup Aug 9, 2010
8d9dea4
- fix issue with noConflict and file uploads
malsup Sep 4, 2010
b712a9a
#fix: fileUpload doesn't send form values if beforeSubmit disables them.
Sep 30, 2010
6210b51
a is optional argument
Oct 2, 2010
a603b6e
-add missing var declarations
malsup Oct 18, 2010
a53241d
Fix issue #26 (escaped entities in <pre> elements)
malsup Dec 3, 2010
6b50a9d
bump version
malsup Dec 3, 2010
ece7bed
Fix case where form has no action attribute but contains an input wit…
malsup Dec 4, 2010
df9cb10
don't call success handler when upload is aborted
malsup Dec 8, 2010
0657b81
v2.60 - updates for jQuery 1.5 and opera upload fixes (I think)
malsup Jan 29, 2011
8a4e17f
v2.61 - fix handling of xml responses
malsup Jan 29, 2011
f263ddb
v2.62 - Fixes for older jQuery versions (upload stuff)
malsup Jan 29, 2011
317312d
v2.63 - fix date in header
malsup Jan 29, 2011
3aa3e66
v2.64 - fixed bug in upload callback access
malsup Feb 26, 2011
d05ade9
v2.65 - fixed order in which iframe doc is retrieved from iframe element
malsup Mar 10, 2011
11edbfc
v2.66 - rollback iframe doc access for non-opera browsers; make sure …
malsup Mar 12, 2011
bbb98d8
v2.67 - back to original iframe doc logic. seems to work everywhere …
malsup Mar 12, 2011
7238728
emulate xhr.status & xhr.statusText using node attributes e.g. <body …
kares Mar 23, 2011
776dbd7
make sure 'ajaxError' is correctly triggered if we receive a xhr.stat…
kares Mar 23, 2011
82f97c8
v2.68 - Fix timeout handling for file uploads
malsup Apr 5, 2011
3e90599
v2.69 - honor default success callback
malsup Apr 6, 2011
9df439a
1.5 compatibility - $.httpSuccess was removed
kares Apr 28, 2011
48339b6
Merge remote branch 'upstream/master'
kares Apr 28, 2011
eb5581f
v2.70 - improve xml response detection
malsup Apr 28, 2011
4f46b5c
- add support for embedding text response in a textarea
malsup Apr 28, 2011
5d413a0
v2.72 - fix timeout logic with file uploads.
malsup Apr 28, 2011
0c778dc
v2.73 - adjust logic for setting xml response header
malsup May 3, 2011
64203a1
Merge branch 'master' of git://github.com/malsup/form
kares May 20, 2011
b181657
v2.74 - IE fix for json response to file upload
malsup May 20, 2011
9188b1f
v2.75 - fix url hash handling
malsup May 20, 2011
58821e5
Merge branch 'master' of https://github.com/kares/form into kares-master
malsup May 22, 2011
949a17f
xhr.status is by default 0 - consider it
kares May 22, 2011
b5366ca
v2.76 - add iframeTarget option
malsup May 22, 2011
0bce4e0
Merge branch 'master' of https://github.com/kares/form into kares-master
malsup May 23, 2011
e2c3fd8
set errMsg to statusText
malsup May 23, 2011
8a88948
merge from kares
malsup May 23, 2011
e87076b
v2.77 - support status/statusText attrs on file upload response (than…
malsup May 23, 2011
4207177
merge
malsup May 24, 2011
a640a11
v2.78 version bump
malsup May 24, 2011
d82ed77
v2.79 - fix bug in file upload callback that assumed a dataType was d…
malsup May 26, 2011
959195e
Remove useless code.
malsup May 26, 2011
ee5e4a4
fixed for: https://github.com/malsup/form/issues/40
malsup May 27, 2011
b36e07a
v2.81 - add detection for server-side aborts.
malsup Jun 5, 2011
210ab53
support HTML5 input types in clearFields function.
malsup Jun 15, 2011
0eab12c
Fix for issue #99 - ie7 getAttribute
malsup Jun 15, 2011
63f458e
issue #101, allow iframe usage with GETs
malsup Jun 15, 2011
62f3e88
removed extra semicolon
malsup Jun 16, 2011
f5a1047
v2.83 - fix use of prop/attr
malsup Jul 11, 2011
d84d0fd
Change 'attr' to 'removeAttr' for serialized inputs
andrew-sayers--slando Jul 25, 2011
e77e287
v2.84: Use $.isArray instead of instance test (thanks Krinkle)
malsup Aug 12, 2011
92df3c2
Fix broken HTML in JSON response as described in Issue #117
x3ro Sep 20, 2011
7ae6cb6
Fix bug where JSON is not recognized if type-string is all uppercase
x3ro Sep 20, 2011
6c50475
Fix broken JSON requests in Firefox
x3ro Sep 21, 2011
33f45ab
add logging flag and fix IE 'get' issues
malsup Sep 24, 2011
4b8987e
Merge branch 'x3ro-Fix'
malsup Sep 24, 2011
ee9daab
Merge branch 'master' of https://github.com/andrew-sayers--slando/for…
malsup Sep 24, 2011
5c9c8d8
v2.86; add support for 'traditional' serialization
malsup Oct 8, 2011
a2d9ba9
v.2.87 add support for clearing hidden fields
malsup Oct 21, 2011
254b221
v2.90 - add support for XHR file uploads and Rails CSRF tokens.
malsup Nov 22, 2011
e44b27c
v2.91 - add proposed fix for issue #113
malsup Nov 22, 2011
d800365
v2.92 - formatting fixes (tabs/spaces)
malsup Nov 22, 2011
2f7192d
v2.93 - fix for 'extra data' in FormData uploads.
malsup Dec 1, 2011
db3910b
v2.94 - fixes for ajax upload event (#156) and bad utf-8 char.
malsup Dec 13, 2011
626b116
v2.95 - fix recursion error (issue #163)
malsup Jan 30, 2012
78413e4
v2.96: add delegation support to ajaxForm
malsup Feb 16, 2012
903691f
Fix the XHR level 2 file uploads so as not to reorder the form data.
dairiki Mar 4, 2012
95df1f0
v2.97 (version bump)
malsup Mar 6, 2012
c05a15c
v2.98. fix for issue #171
malsup Mar 6, 2012
3504f94
v2.99 - convert tabs to spaces and jshint-ify
malsup Mar 6, 2012
19cd7dd
v3.00 - upload progress support
malsup Mar 7, 2012
ce3dd62
v3.01 - rename progress option to uploadProgress
malsup Mar 7, 2012
22e9c82
v3.02 - add test for lengthComputable
malsup Mar 7, 2012
656b145
add readme
malsup Mar 8, 2012
060d568
update readme
malsup Mar 8, 2012
29bf7f5
update readme (licensing)
malsup Mar 8, 2012
45b4412
fix licensing links
malsup Mar 8, 2012
20e4d44
progressevent.position property is deprecated
doochik Mar 16, 2012
362cc6f
v3.04 - fix for #185.
malsup Apr 4, 2012
b15b338
added required attribute value of input elements to formToArray retur…
collingo Apr 4, 2012
189e675
v3.05 - allow additional fields to be cleared in clearFields and clea…
malsup Apr 6, 2012
08d5085
#178
malsup Apr 6, 2012
3c48d1a
Merge branch 'doochik-patch-1'
malsup Apr 6, 2012
66078e3
version bump
malsup Apr 6, 2012
1f723a8
Update license links.
malsup Apr 6, 2012
e90b3ed
Merge branch 'master' of https://github.com/collingo/form into collin…
malsup Apr 6, 2012
aab97f3
version bump for pull #189
malsup Apr 6, 2012
f3d7871
missing semicolons
malsup Apr 7, 2012
5904d38
#180; upload empty file input
malsup Apr 16, 2012
47f7cf0
deep serialize any extra data params passed in when submitting multipart
May 16, 2012
8f71bae
fix issue where certain extraData form fields get sent with spaces en…
Jun 20, 2012
b9a8195
Fix for #201 and #217
malsup Jul 20, 2012
9e99be4
Fix for #217
malsup Jul 20, 2012
37c4827
#218; wrong context scope
malsup Jul 29, 2012
ab96d5f
#216; typo in comment
malsup Jul 29, 2012
79c1864
#214; upload cancel improvements.
malsup Jul 29, 2012
8914e4b
#213; Ability to specify multiple fields with the same name on iframe…
malsup Jul 29, 2012
ff80d9d
#214; improve fix for stopping upload aborts
malsup Jul 30, 2012
6540951
merge
malsup Sep 9, 2012
8f8013d
#200; support deep serialization for extra data args
malsup Sep 9, 2012
c1fdefd
#234 provide access to jqxhr
malsup Sep 25, 2012
16022a3
#233, xhr upload method
malsup Sep 25, 2012
cfd9c57
#105; add support for deferreds.
malsup Sep 29, 2012
215f89f
update docs for jqxhr
malsup Sep 29, 2012
0cd98cd
Update documentation to use standard form selectors, e.g. input[type=…
javierjulio Nov 19, 2012
0c3860b
Replace deprecated :submit with standard [type=submit] selector.
javierjulio Nov 19, 2012
aff16f4
Replace deprecated :image with standard [type=image] selector.
javierjulio Nov 19, 2012
588306a
Update :file to now be standard [type=file] selector.
javierjulio Nov 19, 2012
3d45e1b
Remove depreated :input selector and just use attribute selectors sin…
javierjulio Nov 19, 2012
caae21b
merge and update version
malsup Nov 20, 2012
1e9436b
fix file input selector
malsup Nov 20, 2012
0375867
#252; fix space/plus issue with deepSerialize
malsup Dec 1, 2012
1f45663
Added file inputs to clearInputs function, because they weren't being…
Saintless Dec 1, 2012
a8043e2
bump version
malsup Dec 1, 2012
c4f56b8
#257; fix try/catch around execCommand
malsup Dec 11, 2012
7067bf1
fix error - Uncaught TypeError: Object has no method 'appendTo', whe…
zealotous Dec 26, 2012
c5757f9
version bump
malsup Dec 26, 2012
5bf7c8f
#269,#270; remove $.browser usage
malsup Jan 17, 2013
1b775fc
reversion and add json metadata
malsup Jan 18, 2013
9f4e33e
adding package.json with jam section
garbas Jan 21, 2013
e59fde4
Added access to $form in complete and error callbacks, as per my comm…
Jan 21, 2013
e64be89
use submit method of pristine form - as suggested by malsup
chaoflow Jan 25, 2013
b3dccf1
Use array as deepSerialize result holder
vicary Jan 27, 2013
bd83673
merge
malsup Jan 28, 2013
897a5a0
version bump
malsup Jan 28, 2013
e15f3e9
Fixed 'onprogress' event handling for file upload.
cylon-v Feb 6, 2013
baf27eb
version bump
malsup Feb 6, 2013
9ed04d4
Add Composer support
RobLoach Mar 3, 2013
5fde266
#289, IE7 upload error
malsup Mar 5, 2013
7336850
#301; cloned file input should include event handlers
malsup Mar 22, 2013
533eb10
#219, #240; fix attr/prop usage
malsup Mar 22, 2013
4e089ca
Merge branch 'master' of https://github.com/garbas/form into garbas-m…
malsup Mar 22, 2013
257a78f
Merge branch 'composer' of https://github.com/RobLoach/form into RobL…
malsup Mar 22, 2013
beb122a
possible fix for #267
malsup Mar 22, 2013
92c4aaa
#307; fix uglify warning
malsup Mar 28, 2013
abf3f33
best attempt getting response document
trentmillar Apr 3, 2013
adcaf50
version bump
malsup Apr 3, 2013
c1a688e
Add Composer component details
RobLoach Apr 5, 2013
ce55e90
add copyright to header
malsup Apr 9, 2013
16ab5fa
update readme copyright info
malsup Apr 10, 2013
05c26d7
readme formatting
malsup Apr 10, 2013
8548ef5
Merge branch 'master' of https://github.com/freejosh/form into freejo…
malsup May 3, 2013
328cc2e
version bump
malsup May 3, 2013
6205235
#318; fix default method and action calc
malsup May 17, 2013
4bbb645
#319; 'traditional' option is ignored during deep serialization
malsup May 23, 2013
a0f16e4
#326; change reference from jQuery to $
malsup Jun 16, 2013
cc1ff7f
Add component.json for use with Bower or Component
JohnAlbin Jun 24, 2013
76034cb
Update and rename component.json to bower.json
JohnAlbin Jun 24, 2013
36a6faa
Fix parse error bower.json
jasuca Jul 6, 2013
f0a526e
Add version to bower.json
jasuca Jul 6, 2013
a83d4a1
#323,#339; fix error when no options passed
malsup Jul 11, 2013
5e7391b
update bower and package json files
malsup Jul 16, 2013
d18b627
#325, #341
malsup Jul 31, 2013
006b4e8
#346; default 'method' to ajaxSettings value
malsup Jul 31, 2013
18327ab
Fix how jQuery is passed to closure
malsup Jul 31, 2013
3409383
Lowercase header names when calling getResponseHeader() on a mock XHR…
TheDistantSea Aug 13, 2013
349edee
Merge branch 'http-header-case-insensitive' of https://github.com/The…
malsup Aug 13, 2013
be5f58e
version bump
malsup Aug 13, 2013
bbe8ee0
Update jquery.form.js
tatesn Aug 28, 2013
25bce75
version bump
malsup Sep 2, 2013
00ad2be
#357; set POST method correctly
malsup Sep 2, 2013
d0e782f
#358, bind event for resident iframes!
malsup Sep 4, 2013
1f1770a
#365; fix for delegation (via: Strato)
malsup Sep 16, 2013
8e27059
formData() option is added, useful in multiple file upload
Oct 11, 2013
f53102f
modified comment
Oct 11, 2013
73954b6
version bump
malsup Oct 17, 2013
485b4e2
update package files
malsup Oct 20, 2013
82355b0
v3.46.0; add AMD support
malsup Nov 21, 2013
7eef0d4
Updating version in bower.json
cvn Dec 16, 2013
93d0bd6
Updating version in package.json
cvn Dec 16, 2013
d235e9a
#380; reset form enctype attribute
malsup Dec 27, 2013
34fbed7
#386; account for elements that use form attribute
malsup Dec 27, 2013
5a69c7f
version bump
malsup Dec 27, 2013
6c72f5c
Add gruntfile and cleanup.
malsup Dec 28, 2013
fa6a213
#390; fix for ie8
malsup Feb 5, 2014
3802885
#390; fix old IE
malsup Feb 19, 2014
45a0eb9
Switch to gulp build (just for fun).
malsup Feb 22, 2014
7b5f82a
added optional CDN support for #408
jdorfman May 5, 2014
46f534c
Merge pull request #409 from jdorfman/master
malsup May 6, 2014
0f12213
#419; fix for dotted path form ids (@thet)
malsup Jun 21, 2014
351c939
Update CDN path to reflect new tag version format
kieran Jul 21, 2014
6bf24a5
#427; update readme
malsup Sep 3, 2014
1ef6f61
chore: merge jquery-form history into third-party/projects/
wincent Feb 8, 2021
b93abd6
docs: hoist GPL-2.0.txt license text to top level
wincent Feb 8, 2021
60814e0
chore: adjust top-level config do ignore third-party/projects/
wincent Feb 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
# Third-party code
#

/third-party/projects
node_modules
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@
/copyright.js
/maintenance/projects/**/copyright.js
/projects/**/copyright.js

#
# Third-party.
#

/third-party/projects
339 changes: 339 additions & 0 deletions LICENSES/GPL-2.0.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ module.exports = {
'<rootDir>/projects/js-toolkit',
'<rootDir>/projects/npm-tools/packages/npm-scripts',

// Third-party.

'<rootDir>/third-party/projects',

// Standard ignores.

'/node_modules/',
Expand Down
208 changes: 208 additions & 0 deletions third-party/projects/jquery-form/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
#[jQuery Form Plugin](http://jquery.malsup.com/form/)

##Overview
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.

No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!

---

##API

###jqXHR
The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</code> key after each <code>ajaxSubmit</code>
call. It can be accessed like this:
````javascript
var form = $('#myForm').ajaxSubmit({ /* options */ });
var xhr = form.data('jqxhr');

xhr.done(function() {
...
});
````

###ajaxForm( options )
Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does **not** submit the form. Use `ajaxForm` in your document's `ready` function to prepare existing forms for AJAX submission, or with the `delegation` option to handle forms not yet added to the DOM.
Use ajaxForm when you want the plugin to manage all the event binding for you.

````javascript
// prepare all forms for ajax submission
$('form').ajaxForm({
target: '#myResultsDiv'
});
````

###ajaxSubmit( options )
Immediately submits the form via AJAX. In the most common use case this is invoked in response to the user clicking a submit button on the form.
Use ajaxSubmit if you want to bind your own submit handler to the form.

````javascript
// bind submit handler to form
$('form').on('submit', function(e) {
e.preventDefault(); // prevent native submit
$(this).ajaxSubmit({
target: 'myResultsDiv'
})
});
````

---

##Options
Note: all standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be used.

###beforeSerialize
Callback function invoked prior to form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.

````javascript
beforeSerialize: function($form, options) {
// return false to cancel submit
}
````

###beforeSubmit
Callback function invoked prior to form submission. This provides an opportunity to manipulate the form before it's values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options Oobject.

````javascript
beforeSubmit: function(arr, $form, options) {
// form data array is an array of objects with name and value properties
// [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
// return false to cancel submit
}
````

###clearForm
Boolean flag indicating whether the form should be cleared if the submit is successful

###data
An object containing extra data that should be submitted along with the form.

````javascript
data: { key1: 'value1', key2: 'value2' }
````

###dataType
Expected data type of the response. One of: null, 'xml', 'script', or 'json'. The dataType option provides a means for specifying how the server response should be handled. This maps directly to jQuery's dataType method. The following values are supported:

* 'xml': server response is treated as XML and the 'success' callback method, if specified, will be passed the responseXML value
* 'json': server response will be evaluted and passed to the 'success' callback, if specified
* 'script': server response is evaluated in the global context

###delegation
true to enable support for event delegation
*requires jQuery v1.7+*

````javascript
// prepare all existing and future forms for ajax submission
$('form').ajaxForm({
delegation: true
});
````

###error
Callback function to be invoked upon error.

###forceSync
Only applicable when explicity using the iframe option or when uploading files on browses that don't support XHR2.
Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates prior to performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."

###iframe
Boolean flag indicating whether the form should *always* target the server response to an iframe instead of leveraging XHR when possible.

###iframeSrc
String value that should be used for the iframe's src attribute when/if an iframe is used.

###iframeTarget
Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This options allows you to use an existing iframe if you wish. When using this option the plugin will make no attempt at handling the response from the server.

###replaceTarget
Optionally used along with the the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.

###resetForm
Boolean flag indicating whether the form should be reset if the submit is successful

###semantic
Boolean flag indicating whether data must be submitted in strict semantic order (slower). Note that the normal form serialization is done in semantic order with the exception of input elements of `type="image"`. You should only set the semantic option to true if your server has strict semantic requirements and your form contains an input element of `type="image"`.

###success
Callback function to be invoked after the form has been submitted. If a `success` callback function is provided it is invoked after the response has been returned from the server. It is passed the following arguments:

1. responseText or responseXML value (depending on the value of the dataType option).
2. statusText
3. xhr (or the jQuery-wrapped form element if using jQuery < 1.4)
4. jQuery-wrapped form element (or undefined if using jQuery < 1.4)

###target
Identifies the element(s) in the page to be updated with the server response. This value may be specified as a jQuery selection string, a jQuery object, or a DOM element.

###type
The method in which the form data should be submitted, 'GET' or 'POST'.

###uploadProgress
Callback function to be invoked with upload progress information (if supported by the browser). The callback is passed the following arguments:

1. event; the browser event
2. position (integer)
3. total (integer)
4. percentComplete (integer)

###url
URL to which the form data will be submitted.

---

##Utility Methods
###formSerialize
Serializes the form into a query string. This method will return a string in the format: `name1=value1&name2=value2`

````javascript
var queryString = $('#myFormId').formSerialize();
````

###fieldSerialize
Serializes field elements into a query string. This is handy when you need to serialize only part of a form. This method will return a string in the format: `name1=value1&name2=value2`

````javascript
var queryString = $('#myFormId .specialFields').fieldSerialize();
````

###fieldValue
Returns the value(s) of the element(s) in the matched set in an array. This method always returns an array. If no valid value can be determined the array will be empty, otherwise it will contain one or more values.

###resetForm
Resets the form to its original state by invoking the form element's native DOM method.

###clearForm
Clears the form elements. This method emptys all of the text inputs, password inputs and textarea elements, clears the selection in any select elements, and unchecks all radio and checkbox inputs. It does *not* clear hidden field values.

###clearFields
Clears selected field elements. This is handy when you need to clear only a part of the form.

---

##File Uploads
The Form Plugin supports use of [XMLHttpRequest Level 2]("http://www.w3.org/TR/XMLHttpRequest/") and [FormData](https://developer.mozilla.org/en/XMLHttpRequest/FormData) objects on browsers that support these features. As of today (March 2012) that includes Chrome, Safari, and Firefox. On these browsers (and future Opera and IE10) files uploads will occur seamlessly through the XHR object and progress updates are available as the upload proceeds. For older browsers, a fallback technology is used which involves iframes. [More Info](http://malsup.com/jquery/form/#file-upload)

---

##CDN Support
`<script src="//oss.maxcdn.com/jquery.form/3.50/jquery.form.min.js"></script>`

##Copyright and License
Copyright 2006-2013 (c) M. Alsup

All versions, present and past, of the jQuery Form plugin are dual licensed under the MIT and GPL licenses:

* [MIT](http://malsup.github.com/mit-license.txt)
* [GPL](http://malsup.github.com/gpl-license-v2.txt)

You may use either license. The MIT License is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.

If the GPL suits your project better you are also free to use the plugin under that license.

You don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the jQuery Form Plugin in commercial projects as long as the copyright header is left intact.


---

Additional documentation and examples at: http://malsup.com/jquery/form/
15 changes: 15 additions & 0 deletions third-party/projects/jquery-form/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "jquery-form",
"version": "3.51.0",
"main": "jquery.form.js",
"author": "M. Alsup",
"dependencies": {
"jquery": ">=1.5"
},
"ignore": [
"README.md",
"composer.json",
"form.jquery.json",
"package.json"
]
}
40 changes: 40 additions & 0 deletions third-party/projects/jquery-form/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "malsup/form",
"description": "A simple way to AJAX-ify any form on your page; with file upload and progress support.",
"type": "component",
"homepage": "http://jquery.malsup.com/form/",
"keywords": [
"form",
"upload",
"ajax"
],
"support": {
"issues": "https://github.com/malsup/form/issues",
"wiki": "http://jquery.malsup.com/form/"
},
"authors": [
{
"name": "M. Alsup",
"homepage": "http://jquery.malsup.com"
}
],
"license": [
"MIT",
"GPL-2.0"
],
"require": {
"components/jquery": ">=1.5"
},
"extra": {
"component": {
"scripts": [
"jquery.form.js"
],
"shim": {
"deps": [
"jquery"
]
}
}
}
}
33 changes: 33 additions & 0 deletions third-party/projects/jquery-form/form.jquery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "form",
"title": "Form",
"description": "A simple way to AJAX-ify any form on your page; with file upload and progress support.",
"keywords": [
"form",
"upload",
"ajax"
],
"version": "3.51.0",
"author": {
"name": "M. Alsup",
"url": "http://jquery.malsup.com"
},
"licenses": [
{
"type": "MIT",
"url": "http://malsup.github.com/mit-license.txt"
},
{
"type": "GPL",
"url": "http://malsup.github.com/gpl-license-v2.txt"
}
],
"bugs": "https://github.com/malsup/form/issues",
"homepage": "http://jquery.malsup.com/form/",
"docs": "http://jquery.malsup.com/form/",
"download": "http://malsup.github.com/jquery.form.js",
"dependencies": {
"jquery": ">=1.5"
}
}

18 changes: 18 additions & 0 deletions third-party/projects/jquery-form/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* buildfile for jquery.form plugin */
var gulp = require('gulp'),
concat = require('gulp-concat'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify');

gulp.task('default', function() {
gulp.src(['jquery.form.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(uglify({ preserveComments: 'some' }))
.pipe(concat('jquery.form.min.js'))
.pipe(gulp.dest('.'));
});

gulp.task('watch', function () {
gulp.watch('jquery.form.js', ['default']);
});
Loading