이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

ActionConfirmWidget

2020년 11월 15일 오후 4:03

Introduction

Introduced in v5.1.23The action-confirm widget is an action widget that prompts the user for confirmation and invokes other action widgets contained within it only if the user confirms. ActionWidgets are used within triggering widgets such as the ButtonWidget.

Content and Attributes

The action-confirm widget is invisible. Any content within it is only processed if the user confirms the action, or the confirmation has been disabled by the $prompt attribute.

AttributeDescription
$messageOptional message displayed to the user when asking for confirmation.
$promptOptional flag, set to "no" to disable the prompt for confirmation. Defaults to "yes"

Examples

Here is an example of a button that asks the user for confirmation, before deleting the caption and tags fields of the current tiddler:

<$button>
<$action-confirm $message="Do you wish to delete the caption and tags?">
<$action-deletefield caption tags/>
Delete "caption" and "tags"
</$action-confirm>
</$button>

That renders as:

Here is an example of a button that uses the optional $prompt attribute to control whether to prompt the user before deleting the text field of the tiddler HelloThere:

<$button>
<$action-confirm $message="Do you wish to delete the text field?" $prompt={{$:/state/promptUser}}>
<$action-deletefield $tiddler="HelloThere" $field="text"/>
</$action-confirm>
Delete text from ~HelloThere
</$button>

That renders as: