I would like to have something like this: when checked, a checkbox adds a tag to a tiddler but also creates a new tiddler based on the first one, without the possibly new tag.
I can’t answer that but, optionally, you can do this with a ButtonWidget instead. In a button you can control the order of events by using internal action widgets and the action attribute of the buttonwidget itself:
<$button actions=... >
<actionwidgets>
</$button>
I can’t remember right now which actions take place first (…I think it is first the inner ones and last the outer one, but not sure) but it would be simple to test.
The createTiddler-title variable is only defined inside the scope of the $action-createtiddler widget. However, note that your use of the $action-createtiddler widget ends with a “/>”, which means that it has no content, and the $action-listops widget that follows it is outside the scope of the $action-createtiddler widget.
To use createTiddler-title properly, you need to write something like:
In the OP, @erwan uses a $checkbox to SET the done tag on the current tiddler. Then, as a side-effect, actions=<<myactions>> is invoked to COPY the current tiddler to a new tiddler, using the current tiddler as the $basetitle AND the $template, which results in the new tiddler having a tag of “done”, which is NOT wanted on the new tiddler. Thus, <<myactions>> also uses