Wednesday, May 25, 2011

Re: Form Validation - Redisplay With Error

sorry, i'll repost under the appropriate subject.

On 25 May 2011 17:11, Ndungi Kyalo <ndungi@gmail.com> wrote:
> Am trying to pre-select a radio button created with the django.forms library
> :
>     vote = forms.ChoiceField(
>         widget = forms.RadioSelect(),
>         choices = [
>             ['a', 'i liked it'],
>             ['b', 'i did not like it']
>         ],
>         required=True
>     )
> How would I go about getting the 'a' choice pre-selected on an unbound form
> ?
> --
> Ndungi Kyalo

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

No comments:

Post a Comment