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
--~--~-~--~
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
2 matches
Mail list logo