﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23921	Can't hide a hidden field in the django admin	Leandro Poblet	nobody	"I have a form in django 1.6.5 like this:

{{{
#!python
class ExampleForm(forms.ModelForm):

   id_image = forms.CharField(widget=forms.HiddenInput())
   image = forms.ImageField(widget=CustomImageUploader())

   # Tried this
    def __init__(self, *args, **kwargs):
        super(ExampleForm, self).__init__(*args, **kwargs)
        if self.instance and self.instance.pk:
            self.fields['id_image'].widget = forms.HiddenInput()

   class Meta:
      fields = ('id_image', 'image',)
}}}

And I couldn't find a way to hide the form in the django's admin. I can't exclude it because I have a custom form with a javascript function that fills the id_image field, so the only way I have to do this is by hiding the value, because it doesn't look nice for the end user."	Bug	closed	Forms	1.6	Normal	invalid			Unreviewed	0	0	0	0	0	0
