Add the "initial" parameter when instantiating your form

e.g f = SomeForm(initial={'choices': 'a'})

-Billy


2011/5/25 Ndungi Kyalo <ndungi@gmail.com>
Am trying to pre-select a radio button created with the django.forms library :

    choices = 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 a freshly loaded unbound form ?

_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke