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
First, you need to invoke the .find()
method like:
var serializedReturn = $(this).find('input[name!=security]').serialize();
Otherwise the complete string would go into the css query engine (Sizzle).
Secondly:
I have another form with the id of ofform-reset and if i use:
You need to change this. It's invalid markup to have multiple ID's. If I understood you wrong here, the first solution might also help you here, invoking the .find()
method aswell:
var serializedReturn = $('#ofform').find('input[name!=security]').serialize();