Re: forms, hidden fields
Bang on the head :-) Cheers for that On Jan 18, 5:55 pm, Brian Nealwrote: > On Jan 18, 8:32 am, niall-oc 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 at http://groups.google.com/group/django-users?hl=en.
Re: forms, hidden fields
On Jan 18, 8:32 am, niall-ocwrote: > ... > 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-widgets 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 at http://groups.google.com/group/django-users?hl=en.
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-fields 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 -- 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.