The ''action-setfield'' widget is an [[action widget|ActionWidgets]] that assigns values to the fields of a tiddler. ActionWidgets are used within triggering widgets such as the ButtonWidget.
! Content and Attributes
The ''action-setfield'' widget is invisible. Any content within it is ignored.
|!Attribute |!Description |
|$tiddler |The title of the tiddler whose fields are to be modified (if not provided defaults to the [[WidgetVariable: currentTiddler]] |
|//{any attributes not starting with $}// |Each attribute name specifies a field to be modified with the attribute value providing the value to assign to the field |
! Examples
Here is an example of a pair of buttons that open the control panel directly to specified tabs. They work by using ''action-setfield'' to set the state tiddler for the control panel tabs.
Here is an example of a button that assigns tags and fields to the tiddler HelloThere, and then navigates to it and opens the tiddler info panel on the "Fields" tab:
<$macrocall $name='wikitext-example-without-html'
src='<$button>
<$action-setfield $tiddler="HelloThere" tags="NewTag [[Another New Tag]]" color="red"/>