I have a selectWidget that triggers a revealWidget based on what is in <<qualify $:/state/selectedPlayer>>.
If the selectWidget allows multiple, is it possible to parse the state tiddler and do multiple reveals? Most people often just select themselves for review but I would like to allow selecting another player of the same class and reveal them in a flexgrid for side by side comparison.
Give this example a try on https://TiddlyWiki.com
<$let state=<<qualify $:/state/selectedPlayer>>>
<$select tiddler=<<state>> multiple>
<$list filter="[tag[HelloThere]]">
<option><<currentTiddler>></option>
</$list>
</$select>
<$reveal state=<<state>> type="nomatch" text="" tag="div">
<$list filter="[<state>get[text]enlist-input[]]">
<h2><<currentTiddler>></h2>
<blockquote><$transclude mode="block"/></blockquote>
</$list>
</$reveal>
Notes:
- For convenience,
state is the qualified tiddler title that holds the selection(s) from the list in its text field
- In this example, the
$select widget shows a list of all tiddlers tagged with HelloThere
- The
$reveal widget is displayed if ANY list items are selected (i.e., text field is not blank)
- The
$reveal widget uses a $list widget to show the title and contents of each of the selected tiddlers
Hopefully this should be enough to get you started in the right direction.
enjoy,
-e
As far as I can see the only reason you ever need to use the reveal widget instead of a list widget is if you want to use popups, or animation.
@john.edw_gmail.com yes you can have multiple reveals, responding to multiple state values. It is irrelevant wether that state changes due to the select widget, checkboxes, or checkboxes and list filed.
- We can revert to a list widget to do the revealing, rather than a reveal if we need to use a filter, rather than one of the reveals conditions.
- Perhaps we should as for a filter option on the reveal widget.