[Django]-Accessing MultipleChoiceField choices values

1👍

It might not be a beautiful solution, but I would imagine that the display names are all still available from form.fields['emails'].choices so you can loop through form.cleaned_data['emails'] and get the choice name from the field’s choices.

8👍

Ok, hopefully this is closer to what you wanted.

emails = filter(lambda t: t[0] in form.cleaned_data['emails'], form.fields['emails'].choices)

That should give you the list of selected choices that you want.

👤tghw

Leave a comment