I have a form that will allow users to move around the inputs (using jQuery) into any order they want. For the form below, a user might want “fieldD” followed by “fieldA”, “fieldB”, “fieldC”.
Example form:
<form id="myForm" method="post">
<input type="submit">
<table>
<tr><td><input type="text" name="fieldA"></td></tr>
<tr><td><input type="text" name="fieldB"></td></tr>
<tr><td><input type="text" name="fieldC"></td></tr>
<tr><td><input type="text" name="fieldD"></td></tr>
</table>
</form>
What is the best way to capture the ordering the user chose when they submitted the form?
Taking ideas from the answers, I ended up using jQuery to traverse my table to determine the ordering. When I actually implement it, I will determine the ordering (by traversing my table) at the time the form is submitted.
Here’s a jsfiddle that demonstrates the concept:
http://jsfiddle.net/kq8tT/6/