Fixed #25078 -- Added support for disabled form fields

Thanks Keryn Knight and Tim Graham for the reviews.
This commit is contained in:
Claude Paroz 2015-07-07 21:06:57 +02:00
parent 1fed8dd715
commit 1ef4aeab40
6 changed files with 65 additions and 2 deletions

View file

@ -299,6 +299,17 @@ as the rendered output.
See the :ref:`format localization <format-localization>` documentation for
more information.
``disabled``
~~~~~~~~~~~~
.. attribute:: Field.disabled
.. versionadded:: 1.9
The ``disabled`` boolean argument, when set to ``True``, disables a form field
using the ``disabled`` HTML attribute so that it won't be editable by users.
Even if a user tampers with the field's value submitted to the server, it will
be ignored in favor of the value from the form's initial data.
Checking if the field data has changed
--------------------------------------