From 472a0d379e40bd8dd920210b1f95a2169c91ffca Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 13 Dec 2006 23:13:01 +0000 Subject: [PATCH] Added 'Notes on field ordering' to docs/newforms.txt git-svn-id: http://code.djangoproject.com/svn/django/trunk@4200 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/newforms.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/newforms.txt b/docs/newforms.txt index d54ea19d6e..8f499951cb 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -268,6 +268,15 @@ include ``%s`` -- then the library will act as if ``auto_id`` is ``True``. By default, ``auto_id`` is set to the string ``'id_%s'``. +Notes on field ordering +~~~~~~~~~~~~~~~~~~~~~~~ + +In the ``as_p()``, ``as_ul()`` and ``as_table()`` shortcuts, the fields are +displayed in the order in which you define them in your form class. For +example, in the ``ContactForm`` example, the fields are defined in the order +``subject``, ``message``, ``sender``, ``cc_myself``. To reorder the HTML +output, just change the order in which those fields are listed in the class. + More coming soon ================