From 7a6cbb1629b651a55d3e987c42855026aeb2fe98 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 30 Dec 2016 17:49:35 +0000 Subject: [PATCH] Tweaks to checkbox widget docs --- editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid index f7820871f..5165bde90 100644 --- a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid @@ -52,9 +52,13 @@ The example below creates a checkbox that is checked if the index by the name of <$macrocall $name="wikitext-example-without-html" src="""<$checkbox tiddler="ExampleData" index=<> checked="selected" unchecked="" default=""> Selected?"""/> -!! Actions parameter +!! `actions` Attribute -The `actions` parameter here uses both the [[Action Set Field Widget|ActionSetFieldWidget]] and [[Action Send Message Widget|ActionSendMessageWidget]] to demonstrate two actions. The [[Set Widget|SetWidget]] uses a filter value to set the value of variable `tag`. The [[Action Send Message Widget|ActionSendMessageWidget]] joins all the tags into one large tag. The [[Action Set Field Widget|ActionSetFieldWidget]] appends the tags as individual tags. In this example, the [[Field Mangler Widget|FieldManglerWidget]] is required for the [[Action Send Message Widget|ActionSendMessageWidget]] but not for [[Action Set Field Widget|ActionSetFieldWidget]]. Be aware that the action occurs whether you check or uncheck. Surrounding the `actions` attribute string with triple quotes may be necessary. +This example of using the `actions` attribute shows both the [[Action Set Field Widget|ActionSetFieldWidget]] and [[Action Send Message Widget|ActionSendMessageWidget]] to demonstrate two actions. + +The [[Set Widget|SetWidget]] uses a filter value to set the value of variable `tag`. The [[Action Send Message Widget|ActionSendMessageWidget]] joins all the tags into one large tag. The [[Action Set Field Widget|ActionSetFieldWidget]] appends the tags as individual tags. In this example, the [[Field Mangler Widget|FieldManglerWidget]] is required for the [[Action Send Message Widget|ActionSendMessageWidget]] but not for [[Action Set Field Widget|ActionSetFieldWidget]]. Be aware that the action occurs whether you check or uncheck. + +It is often necessary to use triple quotes with the `actions` attribute. Alternatively, the attribute can be assigned directly from a variable with `actions=<>`. <$macrocall $name='wikitext-example-without-html' src='<$fieldmangler> <$set filter="[[Features]] [[Encryption]] +[tags[]]" name="tag">