I am trying to exclude an input by name (it is a hidden input holding my nonce)
The following question is almost what I am looking for:
How do I use jQuery
I am not happy with 'input[name!=security]' because it exclude all other input type like select,.. You can add them manually but this list just keep increasing with new HTML tags. So with every new tag coming, your code is broken again.
Here is my solution:
$form.find(':not(input[name=draft])').serialize()
or
$('form[name=expenses] :not(input[name=draft])').serialize()
Space is very important in second example.