2020-11-30 18:48:48 +00:00
|
|
|
created: 20201130181015815
|
2021-03-07 10:23:14 +00:00
|
|
|
modified: 20210307102027763
|
2020-11-30 18:48:48 +00:00
|
|
|
tags: RadioWidget
|
|
|
|
title: RadioWidget Example
|
|
|
|
type: text/vnd.tiddlywiki
|
|
|
|
|
|
|
|
\define newText() value: $(actionValue)$
|
|
|
|
|
|
|
|
\define radioActions()
|
|
|
|
<$action-sendmessage $message="tm-notify" $param="RadioWidget ExampleTemplate" value=<<actionValue>> current=<<currentTiddler>> />
|
|
|
|
<$action-createtiddler $basetitle="$:/temp/test/value" $overwrite="yes" text=<<newText>>/>
|
|
|
|
<$action-navigate $to="$:/temp/test/value"/>
|
|
|
|
\end
|
|
|
|
|
|
|
|
!! Using Actions
|
|
|
|
|
2021-03-07 10:23:14 +00:00
|
|
|
When you select an option below the following acitons will occur:
|
2020-11-30 18:48:48 +00:00
|
|
|
|
2021-03-07 10:23:14 +00:00
|
|
|
* the value is written to $:/temp/test/value
|
|
|
|
* the ''id'' field of tiddler: $:/temp/test will be updated
|
|
|
|
* a notification showing the ''actionValue'' will be shown
|
2020-11-30 18:48:48 +00:00
|
|
|
|
|
|
|
<$tiddler tiddler="$:/temp/test">
|
2021-03-07 10:23:14 +00:00
|
|
|
|
|
|
|
<$radio field="id" value="a" actions=<<radioActions>> > Option a </$radio>
|
|
|
|
|
|
|
|
<$radio field="id" value="b" actions=<<radioActions>> > Option b </$radio>
|
|
|
|
|
|
|
|
<$radio field="id" value="c" actions=<<radioActions>> > Option c </$radio>
|
|
|
|
|
2020-11-30 18:48:48 +00:00
|
|
|
</$tiddler>
|
|
|
|
|
2021-03-07 10:23:14 +00:00
|
|
|
The wikitext of this example is shown below:
|
2020-11-30 18:48:48 +00:00
|
|
|
|
2021-03-07 10:23:14 +00:00
|
|
|
<$codeblock code={{RadioWidget Example!!text}}/>
|