The contents of the tag input dropdown list should be configurable, and for backward-compatibility should still default to showing a list of tag values, regardless of the target tagField
parameter value. This can be achieved with just a few small changes to the existing $:/core/macros/tag-picker
definition:
In the main tag-picker
macro definition, change
-
\define tag-picker(actions,tagField:"tags")
to
\define tag-picker(actions,tagField:"tags",tagFilter:"[tags[]]")
-
<$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}}>
to
<$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}} tagFilter=<<__tagFilter__>>>
Then, in the tag-picker-inner
macro definition, change
-
nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]"
to
nonSystemTagsFilter="[subfilter<tagFilter>!is[system]search:title<userInput>sort[]]"
-
systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]"
to
systemTagsFilter="[subfilter<tagFilter>is[system]search:title<userInput>sort[]]"
Also, change field first-search-filter
from
-
[tags[]!is[system]search:title<userInput>sort[]]
to
[subfilter<tagFilter>!is[system]search:title<userInput>sort[]]
and change field second-search-filter
from
-
[tags[]is[system]search:title<userInput>sort[]]
to
[subfilter<tagFilter>is[system]search:title<userInput>sort[]]
With these changes in place, you can then write:
<<tag-picker tagField:foo tagFilter:"[get[foo]enlist-input[]]">>
to populate the dropdown list with all values currently contained within foo
fields