I have this schema with a (multi) select
form.widget("gl_primary_author", SelectWidget)
gl_primary_author = schema.Choice(
title=_("Primary author"),
description=_("Primary author"),
required=False,
source=Authors(with_empty=True),
default=None,
)
We have some special requirements within the edit form: drag&support and searching which is accomplished using the SelectizeJS module.
However, the number of list items became larger and larger and we have several of such fields in the edit field of a particular content-type.
I can pass a JSON URL to SelectizeJS for fetching the vocabulary values from Plone...also working.
Problem and question: keeping the existing source
as specified above conflicts with the JSON URL configuration of Plone.
Replacing source=Authors(with_empty=True)
with an empty vocabulary=SimpleVocabulary([])
avoid rendering of the list entries from the Plone side however I can no longer save data back into Plone since the value to be stored does not exist in the empty vocabulary.
There is reasonable approach?