#27431: Disabled fields are marked as changed in form
------------------------+-------------------------------------------
Reporter: Paul | Owner: Kenneth Veldman
Type: Bug | Status: assigned
Component: Forms | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+-------------------------------------------
Changes (by Kenneth Veldman):
* stage: Unreviewed => Accepted
Comment:
Able to reproduce using a form on submit using a simple form with two
comparable fields.
{{{
#!div style="font-size: 80%"
Code highlighting:
{{{#!python
class TestForm(forms.Form):
test_disabled = forms.CharField(disabled=True, initial='test')
test_enabled = forms.CharField(disabled=False, initial='test')
}}}
}}}
Results of form.has_changed() and form.changed_data after the form has
been submitted are:
{{{
#!div style="font-size: 80%"
Code highlighting:
{{{#!python
form.has_changed() # True
form.changed_data # ['test_disabled']
}}}
}}}
Working on writing a patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/27431#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.1abfda164751ed7e8b8f6dec2bc9b7fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.