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

ActionDeleteFieldWidget

 8th June 2024 at 3:13pm

Introduction

The action-deletefield widget is an action widget that deletes specified fields of a tiddler. ActionWidgets are used within triggering widgets such as the ButtonWidget.

Content and Attributes

The action-deletefield widget is invisible. Any content within it is ignored.

AttributeDescription
$tiddlerThe title of the tiddler whose fields are to be modified (if not provided defaults to the current tiddler)
$fieldOptional name of a field to delete
$timestampNew in v5.3.4 Specifies whether the timestamp(s) of the target tiddler will be updated (modified and modifier, plus created and creator for newly created tiddlers). Can be "yes" (the default) or "no"
{any attributes not starting with $}Each attribute name specifies a field to be deleted. The attribute value is ignored and need not be specified

Examples

Delete currentTiddler fields using plain attributes

Use the $action-deletefield widget to delete the "caption" and "tags" fields of the current tiddler
titleOutput
captionA caption
tagstag1 tag2 tag3

Click and watch the "caption" and "tags" field disappear.

Delete fields from a specific tiddler

Use the $action-deletefield widget to delete the "list" and "tags" fields of the tiddler HelloThere
titleOutput

Click HelloThere, then click and watch the "list" and "tags" fields disappear

Delete field from a specific tiddler

Use the $field attribute of the $action-deletefield widget to delete the "text" field of the tiddler HelloThere
titleOutput

Click HelloThere, then click and watch the contents of the "text" field disappear

Delete a variable field name

Use the $field attribute of the $action-deletefield widget to delete a variable field name
titleOutput
descriptionThis field will be deleted

Click and watch the "description" field disappear.

Delete field without updating timestamps

Use the $timestamp attribute of the $action-deletefield widget to prevent creation/change of "modified" and "created" fields
titleOutput
descriptionThis field will be deleted

Click and watch the "description" field disappear without the "modified" and "created" fields getting added