theatlantic/django-select2-forms

autocomplete options render in admin but has no options inline

scottfits opened this issue · 1 comments

I'm using Django 1.11 and the select2 form autosuggests and completes perfectly in admin, but on my HTML page it doesn't.

In HTML, my form field is called tags and I'm using

{{forms.media}} 
{{forms.tags}}

forms.py

...
tags = select2.fields.MultipleChoiceField(Tag,overlay="Choose several skills...")
...

models.py

...
tags = select2.fields.ManyToManyField(Tag,overlay="Choose several skills...",ajax=True,search_field="name")
...

If you want the select2 dropdown to be populated with values from your model you'll need to use select2.fields.ModelMultipleChoiceField