Re: how to set initial value for select multiple

2008-02-14 Thread Matt McClanahan
On Feb 13, 9:34 pm, cschand <[EMAIL PROTECTED]> wrote: > My problem is i want to set initial value for the given network > CheckboxSelectMultiple field.. Since it's a multiple value field, it expects a list of initial values. NetworkForm(initial={'network': [1,2,3]}) Matt --~--~-~--~

how to set initial value for select multiple

2008-02-13 Thread cschand
I have a form class NetworkForm(forms.Form): choices = [] for network in Network.objects.all(): choices.append((network.id, network.name)) network = forms.CharField(widget=forms.CheckboxSelectMultiple(choices=choices)) and in view i called this network f