Checkbox "uncheckactions" (or any actions) do not work?

118 views
Skip to first unread message

Petri M.

unread,
Dec 9, 2020, 7:25:13 AM12/9/20
to TiddlyWiki
Hi,

I have this simple list:

<$list filter="[!has[draft.of]tag[Task archived]sort[created]]">
<div>
<$checkbox tag="Task done" uncheckactions="""<$action-sendmessage $message="tm-remove-tag" $param="Task archived" />""" >
<$view field="done-date"/>
<$link to=<<currentTiddler>>>
<$view field="title"/>
</$link>
</$checkbox>
</div>
</$list>

and I would like the checkbox to remove the "Task done" tag (which it does) but also remove a tag "Task archived". I read that the uncheckactions parameter of the checkbox widget is exactly what I need, however, I cannot get it to work.

Can someone please tell me what I am doing wrong? The documentations mention that the ActionWidget needs to be a string, hence the triple quotes, but it does not work without them either. I also tried to wrap it in an additional macro but that did nothing.

Thanks,
Petri

BurningTreeC

unread,
Dec 9, 2020, 8:27:22 AM12/9/20
to TiddlyWiki
Hi Petri, you'll need the fieldmangler widget to handle the tm-remove-tag message:

<$list filter="[!has[draft.of]tag[Task archived]sort[created]]">
<div>
<$fieldmangler>
<$checkbox tag="Task done" uncheckactions="""<$action-sendmessage $message="tm-remove-tag" $param="Task archived" />""" >
<$view field="done-date"/>
<$link to=<<currentTiddler>>>
<$view field="title"/>
</$link>
</$checkbox>
</$fieldmangler>
</div>
</$list>

P M

unread,
Dec 9, 2020, 8:32:48 AM12/9/20
to tiddl...@googlegroups.com
Ohhhh I was just looking at what is this fieldmangler the docs speak of. Works perfectly, thanks!

-Petri

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/sm3pT3Y_q88/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7fe74ebb-408b-44e9-bced-ae75947f70c6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages