This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

RadioWidget Example

 7th March 2021 at 10:20am

Using Actions

When you select an option below the following acitons will occur:

The wikitext of this example is shown below:

\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

When you select an option below the following acitons will occur:

* 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

<$tiddler tiddler="$:/temp/test">

<$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>

</$tiddler>

The wikitext of this example is shown below:

<$codeblock code={{RadioWidget Example!!text}}/>