I have a custom form having a tags field. An user can select multiple tags from the list of all tags and save these preferences. For the moment it works as a list of checkboxes (multiple columns for a better design, also a max-height on its container + scrollbar in case the list of tags is very long).
I'm trying to improve the UI, because we have +4000 tags...
Then I found this: https://select2.org/getting-started/basic-usage#multi-select-boxes-pillbox
It seems to be the best in our case.
My current code is:
from zope.schema import Choice from zope.schema import List .... tags = List( title=u"Select tags", description=u"""Description here""", value_type=Choice(vocabulary="tags_vocab"), defaultFactory=default_tags, required=False, )
Should I create a custom widget? Or is there something already created I can use instead?
Features I need:
- user can select tags (all of them are visible and can be found by scrolling the list)
- user can search a tag (autocomplete)
- user can see the list of selected tags (I mean already saved ones, too)