mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #25078 -- Added support for disabled form fields
Thanks Keryn Knight and Tim Graham for the reviews.
This commit is contained in:
parent
1fed8dd715
commit
1ef4aeab40
6 changed files with 65 additions and 2 deletions
|
@ -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
|
||||
--------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue