#26129: bound forms do not display disabled field initial values
-------------------------------+------------------------------------
     Reporter:  dieselmachine  |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Forms          |    Version:  1.9
     Severity:  Normal         |   Keywords:  disabled fields, forms
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+------------------------------------
 The subject pretty much says it all. If you create a form with an initial
 value for a disabled field, it displays fine as long as the form is
 unbound. If a user submits the form, and it fails validation, the rendered
 bound form will be missing the initial values for the disabled fields.

 I would expect the disabled fields to always display the contents from the
 form's "initial" dict, whether bound or unbound. The user is unable to
 submit values for that field, and even if he/she tampered with the DOM and
 managed to push something through, _clean_fields still loads the initial
 value and then assigns it to cleaned_data. So the handling is correct, but
 that value never ends up in the rendered field. 'initial' is the only
 possible source for that field, so it seems it should display all the
 time.

 I attached a test file that illustrates the issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/26129>
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/056.58b6e3815b41133cebdd60374fdeae67%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to