<$select tiddler="$:/_Temp/foobar" field="city" default="Foo">
<$list filter="[tag[foobar]]">
<option value={{!!city}}><$view field="city"/></option>
</$list>
</$select>Hi all,
I have finally mastered the <$select> widget, but it has left me wanting a <$combobox> widget as well.....I know we have the original inventor of the combobox itself, lurking around here somewhere, hehe.
<<combobox tiddler:"$:/_Temp/foobar" field:"city" filter:"[tag[foobar]]">>Hi again Eric,
Your LegalStatements tiddler advises that any modifications of your code should best be handled as a feature request. I haven't dug deep enough yet to be making such a request, but I thought it might be useful to know in advance if there is a GitHub repository for this macro, so that any issues can be raised there?
Hegart.
Thanks for the explanation, Eric. I'm really excited by what you've produced here. I've got a working example of it so far in my SampleData playground, here. I still need to overcome these issues with it though:
- To populate the options from any given field, not just the title field.
- To populate the options only with unique/distinct values from the given field.
- To ignore any options that do not contain the given field.
These are all probably more to do with my use case, rather than your macro though. Also, I look forward to later using the okaction: parameter to set the filter: parameter of a subequent <<combobox>> invocation using a filter stored in a tiddler field. I understand from previous advice you've given me on this subject, that I'll then need to use a <$macrocall> widget for that, rather than a <<macro>> invocation. I'll let you know how it goes. Happy to beta-test this for you! ;-)
<<combobox tiddler:"$:/_Temp/foobar" field:"city" filter:"[tag[foobar]each:field[city]]" template:"{{!!city}}">>We've run into a little snag with the goaction parameter. We can't seem to get it to work, neither in your example in the documentation, nor in our own experimental tiddler. Any idea what's going on? This is something we'd really like to use, for all sorts of purposes in our TiddlyCRM project.
I'm making a start on that idea of cascading the selection from one <<combobox>> into the filter for the options of another. However, in the second example on this experiment tiddler, I'm stuck with a bit of a problem. Despite having specified field:"city" as the field from which the option value should be stored, it still seems to be storing the title of the selected option, rather than the city. The option labels are being populated properly, using your example above of template:"{{!!city}}", but the option values aren't respecting the field: parameter.
<$action-setfield $tiddler="""$tiddler$""" $field="""$field$""" $index="""$index$""" $value=<<currentTiddler>>/>
clickaction:"""<<myaction>>"""clickaction:"""<<myaction>>"""