- You need to use the TWCore
<$select>
widget, not the HTML <select>
element. Otherwise, your selection will not be stored anywhere.
- You must also specify a target tiddler (or at least a target fieldname); e.g.
<$select tiddler="MySelection">
or <$select field="myselection">
. Otherwise, the widget will default to setting the text
field of the current tiddler, which would immediately overwrite your code as soon as you make a selection!
- You may also want to specify a default value to use when the target tiddler or field doesn’t exist.
Thus, something like this:
<$select tiddler="MySelection" default="3">
<$list filter="[[DataTiddler]indexes[]nsort[]]" variable="index">
<option value=<<index>>><$view index=<<index>> tiddler="DataTiddler"/></option>
</$list>
</$select>
To exclude a certain value you can write:
<$list filter="[[DataTiddler]indexes[]nsort[]!match[3]]" variable="index">
If you want to exclude based on the displayed text of a certain value, you can use the :filter[...]
filter run prefix, like this:
<$list filter="[[DataTiddler]indexes[]nsort[]] :filter[[DataTiddler]getindex<currentTiddler>!match[N/A]]" variable="index">
Alternatively, you could use a nested $list
widget, like this:
<$list filter="[[DataTiddler]indexes[]nsort[]]" variable="index">
<$list filter="[[DataTiddler]getindex<index>!match[N/A]]">
<option value=<<index>>><$view index=<<index>> tiddler="DataTiddler"/></option>
</$list>
</$list>
enjoy,
-e