On Dec 30, 2007 11:11 AM, l5x <mail.loocas gmail.com> wrote:
>
> On Dec 30, 5:04 pm, Florian Lindner
<mailingli... xgm.de> wrote:
> > Hello,
> > using newforms how can I set fields to be hidden
(the hidden="hidden"
> > attribute)?
>
> Did you mean type="hidden" ?
> http://www.djangoproject.com/documentation/newforms/
#widgets
>
> You can create your own widget if you need to.
>
Or you can just use the HiddenInput widget that already
exists. Here's
how you'd declare a hidden text field:
class SomeForm(forms.Form):
my_text = forms.CharField(max_length=20,
widget=forms.HiddenInput)
HTH,
Todd
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|