[jQuery] Form Plugin: How to add a variable to serialization/array?

2007-03-23 Thread Arne-Kolja Bachstein
Hi there, I am using the form plugin to serialize my form fields and post them to a php file. It's working fine, but I need to add a variable added to the serialized object and/or array, that I use to prevent spamming (a security variable that is not printed in the html code). So I have the

Re: [jQuery] Form Plugin: How to add a variable to serialization/array?

2007-03-23 Thread Mike Alsup
Try this: var securityCheck = mysecuritycode; var formData = $(#myForm).formToArray(); formData.push( { name: security, value: securityCheck }); ... // replace security with whatever the correct name is. On 3/23/07, Arne-Kolja Bachstein [EMAIL PROTECTED] wrote: Hi there, I am using the form

Re: [jQuery] Form Plugin: How to add a variable to serialization/array?

2007-03-23 Thread Arne-Kolja Bachstein
Thank you, Mike, it works great this way! :-) Arne http://www.arnekolja.com Mike Alsup wrote: Try this: var securityCheck = mysecuritycode; var formData = $(#myForm).formToArray(); formData.push( { name: security, value: securityCheck }); ... // replace security with whatever the correct