On Dec 30, 2007 11:11 AM, l5x <[EMAIL PROTECTED]> wrote:
>
> On Dec 30, 5:04 pm, Florian Lindner <[EMAIL PROTECTED]> 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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---