I have a form with a large number of dynamically generated elements. in the submit handler I would like to get all the data at once rather than going by each id. Is there anyway to do it?
3 Answers
your question is not very clear but maybe you're looking for serialize() or serializeArray() jQuery methods
http://api.jquery.com/serialize/
http://api.jquery.com/serializeArray/
e.g
The .serializeArray() method creates a JavaScript array of objects, ready to be encoded as a JSON string. It operates on a jQuery object representing a set of form elements. The form elements can be of several types: