You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a custom field that would behave like the Tags field, i.e., with autocomplete for existing tags, and the ability to add new tags if desired, except that the field would work with a specific vocabulary rather than the default tags vocabulary.
To that end, I have:
Created the vocabulary with the vocabulary_create action.
Defined the field as follows in my dataset schema:
- field_name: dimensionlabel: Dimensionsform_placeholder: eg. Age Groups, Mother Tongue, First Official Language Spokenvalidators: ignore_missing tag_string_convertclasses:
- control-fullform_attrs:
data-module: autocompletedata-module-tags:
data-module-source: /api/2/util/tag/autocomplete?vocabulary_id=dimension&incomplete=?class:
(This takes advantage of the autocomplete API accepting the vocabulary_id parameter).
With that field definition, autocomplete searches the desired vocabulary, and new tags can be entered.
However, the part I'm not figuring out is how to get new tags to be saved in the proper vocabulary. At this point, new tags are always saved in the default tags vocabulary (with an empty vocabulary id). Ideas?
The text was updated successfully, but these errors were encountered:
I am trying to create a custom field that would behave like the Tags field, i.e., with autocomplete for existing tags, and the ability to add new tags if desired, except that the field would work with a specific vocabulary rather than the default tags vocabulary.
To that end, I have:
vocabulary_create
action.vocabulary_id
parameter).With that field definition, autocomplete searches the desired vocabulary, and new tags can be entered.
However, the part I'm not figuring out is how to get new tags to be saved in the proper vocabulary. At this point, new tags are always saved in the default tags vocabulary (with an empty vocabulary id). Ideas?
The text was updated successfully, but these errors were encountered: