def __init__(self, user, *args, **kwargs):
        super(SettingsForm, self).__init__(*args, **kwargs)
        self.fields['default_contact_type'].queryset = Object.filter_permitted(
            user, ContactType.objects)

        try:
            conf = ModuleSetting.get_for_module(
                'treeio.identities', 'default_contact_type')[0]
            default_task_status = ContactType.objects.get(pk=long(conf.value))
            self.fields[
                'default_contact_type'].initial = default_task_status.id
        except Exception:
            pass
Sets choices and initial value
dataset/ETHPy150Open treeio/treeio/treeio/identities/forms.py/SettingsForm.__init__