> Have you simplified your example? The example I provided in the original post is the actual code in my models.py. It's not simplified.
> >>> class TestForm(ModelForm): > > ... range = CharField(widget=HiddenInput) > ... class Meta: > ... model=Foo > ...>>> f=TestForm() > >>> f.as_p() > > u'<p><label for="id_name">Name:</label> <input type="text" name="name" > id="id_name" /><input type="hidden" name="range" id="id_range" /></p>' > > As you can see, the range field is clearly hidden. I get "CharField is not defined" when I try your code. I find that I have to do forms.SomeField. Maybe we're importing different things. In my models.py I have... from django.db import models from django import forms from django.forms import ModelForm I'm using django 1.3. -Ryan -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.