mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #25078 -- Added support for disabled form fields
Thanks Keryn Knight and Tim Graham for the reviews.
This commit is contained in:
@@ -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
|
||||
--------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user