0

I use django-autocomoplete-light to make an autocopmlete-field for tags. I decided to use TextWidget for my form because with ChoiceWidget I can't get the value from web-page. The problem is that when input field is activating, the values displays immediately in the drop-down. The ChoiceWidget works a little bit different. It starts display the values only when some characters are inputed.

kozlone
  • 111
  • 8

1 Answers1

0

Since you didn't provide some code I don't know exactly how your autocomplete registry code looks like, but specifying the minimum amount of characters to 0 does the trick.

Slightly modified example from the docs:

import autocomplete_light.shortcuts as al

al.register(your_model,
    attrs={
        'data-autocomplete-minimum-characters': 0,
    },
)
Leistungsabfall
  • 6,368
  • 7
  • 33
  • 41