stephenmcd/django-forms-builder — pull request #47 by splatte (2012-02-13 23:03:10+00:00)
Title: reordering Fields in admin

There is no way to reorder the fields of a form using the admin. In the inline field admin, one might try by copy/pasting definitions of a field (label, type, help text, ..) from one line into another line and switching fields this way. If there were previous submits to the form, this will lead to unexpected results in the export views because subsequent submits of a form that was "reordered" as described don't use the same column order as earlier submits.

To resolve this, I tried to build upon the `order_with_respect_to` meta-option and `_order` field that are already in the code. I expected this to be far easier to solve but that part of django was quite a hassle. So finally, I came up with a ModelForm subclass that makes the `_order` property editable and thus allowing the user to change the order of Fields. This feature might be expanded to use fancy jquery drag and drop.