class selectHomeForm(forms.Form):
title = forms.CharField(max_length=50, label = 'Select homes:')
def __init__ (self, *args, **kwargs):
super(selectHomeForm, self).__init__(*args, **kwargs)
homes = homeMap.objects.all()
ourchoices = []
for i in homes:
value = (i.id, i.title)
ourchoices.append(value)
self.fields['title'].widget = forms.CheckboxSelectMultiple(choices = ourchoices)