The initial parameter should be in the CharField method and not RadioSelect like you've specified it.
Cheers.
On Jan 28, 2013 6:35 AM, "Nikhil Verma" <varma.nikhil22@gmail.com> wrote:
-- Hi
I am using django 1.4.3 and have a field in form
PROFILE_TYPE = (
('public', 'Public'),
('private', 'Private'),
)
profile_type = forms.CharField(max_length=10, widget=RadioSelect
(choices=PROFILE_TYPE),
initial='Public',
required=False
)
I want that when i open this form the radio button with choice public should be pre selected.
Can anybody explain what mistake you are doing ?
Thanks
--
Regards
Nikhil Verma
+91-958-273-3156
--
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.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment