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.
Attribute | Description |
---|---|
$tiddler | The title of the tiddler whose fields are to be modified (if not provided defaults to the current tiddler) |
$field | Optional name of a field to delete |
$timestamp | Depuis : 5.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
title | Output |
caption | A caption |
tags | tag1 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
title | Output |
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
title | Output |
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
title | Output |
description | This 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
title | Output |
description | This field will be deleted |
Click and watch the "description" field disappear without the "modified" and "created" fields getting added