Django - dropdown form with multiple select
<p><strong>I need guidance building a django <em>dropdown</em> <code>forms.Form</code> field in which I can select <em>multiple</em> choices.  I need to select multiple locations on the <code>office</code> field of the form.</strong></p>

<p>When submitted, the form needs to return a <code>list</code> of the chosen offices (e.g. <code>["New York", "Los Angeles"]</code> or <code>["Austin"]</code>).  Returning a <code>tuple</code> is also acceptable.</p>

<hr>

<p>The best I can do right now is build a <a href="https://docs.djangoproject.com/en/1.10/ref/forms/fields/#multiplechoicefield" rel="noreferrer">multipleChoiceField</a> for <code>office</code> with the following:</p>

<pre><code>from django import forms

class my_Form(forms.Form):

    OPTIONS = [
        ("0", "*ALL"),
        ("1", "New York"),
        ("2", "Los Angeles"),
        ]

    office = forms.MultipleChoiceField(
            choices=OPTIONS,
            initial='0',
            widget=forms.SelectMultiple(),
            required=True,
            label='Office',
        )
</code></pre>

<p>resulting in this form field layout:</p>

<p><a href="https://i.stack.imgur.com/7OZIH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7OZIH.png" alt="enter image description here"></a></p>

<hr>

<p>However, I would like this field to be a dropdown, to take up less space on the page.</p>

<p>I found this <a href="https://djangosnippets.org/snippets/747/" rel="noreferrer">djangosnippet</a> but (1) a few people have mentioned it appears out of date (I can't confirm), and (2) I first want to check if a built-in django form/widget setup can fulfill this task before using custom code.</p>