Commit 60375eda authored by Daniele Procida's avatar Daniele Procida Committed by Tim Graham
Browse files

[1.7.x] Fixed #22796 -- Added a more basic explanations of forms.

Thanks bmispelon, kezabelle, jorgecarleitao, and timgraham for reviews.

Backport of cd20b5d1 from master
parent 088b30f4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -365,6 +365,8 @@ You can write code to perform validation for particular form fields (based on
their name) or for the form as a whole (considering combinations of various
fields). More information about this is in :doc:`/ref/forms/validation`.

.. _ref-forms-api-outputting-html:

Outputting forms as HTML
------------------------

@@ -481,6 +483,8 @@ it calls its ``as_table()`` method behind the scenes::
    <tr><th><label for="id_sender">Sender:</label></th><td><input type="email" name="sender" id="id_sender" /></td></tr>
    <tr><th><label for="id_cc_myself">Cc myself:</label></th><td><input type="checkbox" name="cc_myself" id="id_cc_myself" /></td></tr>

.. _ref-forms-api-styling-form-rows:

Styling required or erroneous form rows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+2 −0
Original line number Diff line number Diff line
à
Aalto
accessor
Aceh
@@ -152,6 +153,7 @@ dirmod
distro
divisibleby
django
Django's
djangojs
djangonaut
djangoproject
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ Using initial data with a formset
Initial data is what drives the main usability of a formset. As shown above
you can define the number of extra forms. What this means is that you are
telling the formset how many additional forms to show in addition to the
number of forms it generates from the initial data. Lets take a look at an
number of forms it generates from the initial data. Let's take a look at an
example::

    >>> import datetime
+505 −223

File changed.

Preview size limit exceeded, changes collapsed.