Skip to content

HeavySelect2Widget confusion regarding choices arg #297

@tisdall

Description

@tisdall

Sorry if I'm missing something simple, but after a few hours of staring at this I feel like I really need to ask...

The docs show an example like this:

class MyForm(forms.Form):
    my_field = forms.ChoicesField(
        widget=HeavySelect2Widget(
            data_url='/url/to/json/response'
        )
    )

What I don't understand is that ChoiceField requires a choices arg but none is passed. When the form is submitted the ChoiceField checks for the value in choices but since no values are passed it always invalidates as there are no values.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions