Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 18, 2011 15:53:16

n.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

forms, hidden fields


class VerificationForm(forms.Form):
domain = forms.CharField(max_length=100,
label='Domain name',
help_text='This is the domain name you chose
during the signup process',
)
mobile_number = forms.CharField(max_length=10,
label='Domain name',
help_text='This is the mobile number you chose
during the signup process',
)
verification_code = forms.CharField(max_length=10,
label='Domain name',
help_text='This is the verification code you
received in your SMS message',
)

There is a simple form. My question is how do you set a field to be
hidden.http://docs.djangoproject.com/en/1.1/topics/forms/#looping-over-the-form-s-fieldsThis document explains how you may check if a field is hidden, however
there seems to be no information on how to initially set the field to
be hidden. I've tried adding hidden=True and is_hidden=True to the
above class but to no avail.

Any help would be really appreciated

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 18, 2011 17:55:22

Brian N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

forms, hidden fields


On Jan 18, 8:32 am, niall-oc <zechs.marq...@gmail.com> wrote:
> ...
> There is a simple form.  My question is how do you set a field to be
> hidden.
>
>http://docs.djangoproject.com/en/1.1/topics/forms/#looping-over-the-f...
>
> This document explains how you may check if a field is hidden, however
> there seems to be no information on how to initially set the field to
> be hidden. I've tried adding hidden=True and is_hidden=True to the
> above class but to no avail.
>
> Any help would be really appreciated

Hi - please see the docs on form widgets and how you can change out a
form field's default widget:http://docs.djangoproject.com/en/1.2/ref/forms/widgets/http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#specifying-widgetsI suspect you'll want to specify a HiddenInput widget for one or more
of your form fields.

Best,
BN

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 20, 2011 14:39:28

n.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

forms, hidden fields


Bang on the head :-)

Cheers for that

On Jan 18, 5:55 pm, Brian Neal <bgn...@gmail.com> wrote:
> On Jan 18, 8:32 am, niall-oc <zechs.marq...@gmail.com> wrote:
>
> > ...
> > There is a simple form.  My question is how do you set a field to be
> > hidden.
>
> >http://docs.djangoproject.com/en/1.1/topics/forms/#looping-over-the-f...
>
> > This document explains how you may check if a field is hidden, however
> > there seems to be no information on how to initially set the field to
> > be hidden. I've tried adding hidden=True and is_hidden=True to the
> > above class but to no avail.
>
> > Any help would be really appreciated
>
> Hi - please see the docs on form widgets and how you can change out a
> form field's default widget:
>
>http://docs.djangoproject.com/en/1.2/ref/forms/widgets/http://docs.djangoproject.com/en/1.2/ref/forms/widgets/#specifying-wi...
>
> I suspect you'll want to specify a HiddenInput widget for one or more
> of your form fields.
>
> Best,
> BN

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 21st of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support