Hi all:
I had a hard time finding this either in tiddlywiki documentation or this 
group, so Im posting this in case its helpful or someone decides to post it 
to the main Tiddlywiki documentation.

I wanted to dynamically create a new tiddler which text should come from a 
list of combo-boxes, but I couldnt find the way to mix all the variables 
into the resulting tiddliwiky tiddler.

I asked a very skilled friend of mine and he came with this solution that I 
would have never imagined or found:

<$select field='letter'>
<option><$action-setfield letter/>A</option>
<option><$action-setfield letter/>B</option>
<option><$action-setfield letter/>C</option>

<$select field='number'>
<option><$action-setfield number/>1</option>
<option><$action-setfield number/>2</option>
<option><$action-setfield number/>3</option>

<$action-setfield $tiddler="Mixing variables examples" tags='mixed_vars' 
aaa={{!!number}} bbb={{!!letter}} $value="{{!!aaa}} {{!!bbb}}"/>

The key is the following part, in which current tiddler variables are 
evaluated into the ones that are evaluated again when the new tiddler is 
aaa={{!!number}} bbb={{!!letter}}

This solution is super simple, fast, and requires no macros.

Best regards!

You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to