

def create_checkboxes_field(self, field, options):
    options['choices'] = [(x.strip(), x.strip()) for x in field.choices.split(',')]
    options['initial'] = [x.strip() for x in field.default_value.split(',')]
    return django.forms.MultipleChoiceField(widget=django.forms.CheckboxSelectMultiple, **options)

dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailforms/forms.py FormBuilder.create_checkboxes_field/original