I'm having trouble passing an item from the Select-Widget to a new tiddler as the tag.

41 views
Skip to first unread message

Geoff Osterberg

unread,
Jul 16, 2018, 9:47:59 AM7/16/18
to TiddlyWiki
I'm trying to create tiddler that will act as a form for new tiddlers.

I want to have an edit-widget that will pass on the title to a new tiddler. I also want to use a select-widget to choose among a list of tiddlers with the tag "Scene" to use as the tag for the new tiddler. 

So far I have been unable to sort this out. The edit-widget does pass along the title to a new widget, but I can't get the drop down list selection to pass along. I did once, but each word of the selection was rendered as a separate tag. I've read the entry on the select function a few times, but I'm learning on the fly and having difficulty making sense of it. Could anyone point me in the direction of a more tutorial that can help me understand how to achieve the goal?


Mark S.

unread,
Jul 16, 2018, 11:00:40 AM7/16/18
to TiddlyWiki
It's a bit convoluted because the tags need to be added with the tm-add-tag message after the new tiddler is created. This seems to work:

\define makenewtiddler()
<$action-createtiddler $basetitle={{UseMeAsName}} $savetitle="NewTiddlerName" />
<$fieldmangler tiddler={{NewTiddlerName}}><$action-sendmessage $message="tm-add-tag" $param="""$(MyTag)$"""/></$fieldmangler>
\end
<$select tiddler="UseMeAsTag" default='HelloThere'>
<$list filter='[tag[HelloThere]sort[title]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</
$select>

<$edit-text tiddler="UseMeAsName" tag="input" size="20"/>

<$vars MyTag={{UseMeAsTag}}>
<$button actions=<<makenewtiddler>>>Make Tiddler</$button>
</
$vars>


Reply all
Reply to author
Forward
0 new messages