This page is part of a static HTML representation of the TiddlyWiki at

WidgetMessage: tm-modal

 17th November 2020 at 8:12am
paramTitle of the tiddler to be displayed
paramObjectHashmap of variables to be provided to the modal, contains all extra parameters passed to the widget sending the message.
rootwindow New in: 5.1.18 yes or true will always display a modal in the wiki-root-window

The modal message is usually generated with the ButtonWidget. The modal message is handled by the TiddlyWiki core.

Fields within the tiddler being displayed in the modal can be used to customise its appearance.


The "currentTiddler" variable is set to the title of the modal tiddler, but can be overridden by specifying a different value in paramObject.


Here is an example of displaying a modal and passing parameters to it: (Note how all parameters to action-sendmessage other than $param and $message are available as variables within the modal.)

Your name: <$edit-text tiddler="$:/temp/yourName" tag="input" default="Your name"/>

Your message:
<$edit-text tiddler="$:/temp/yourMessage" default="Your message"/>

<$action-sendmessage $message="tm-modal" $param="SampleModal" yourName={{$:/temp/yourName}} yourMessage={{$:/temp/yourMessage}}/>
Click me!

That renders as:

Your name:

Your message:

New in: 5.1.18 if triggered from within a new window, the above examples will be displayed within that window. The rootwindow attribute can be set to yes or true to inherit this behavior and to display the Modal within the root window

New in: 5.1.23 Links to tiddlers within a modal will open in the same story as the widget that sent the tm-modal message. You can override this by specifying values for the variables tv-story-list and tv-history-list when sending the tm-modal message.