uncheck all checkboxes

2,573 views
Skip to first unread message

Dave Parker

unread,
Jun 18, 2007, 6:44:41 PM6/18/07
to TiddlyWiki
Is there an easy way to uncheck all checkboxes (checkboxPlugin) of a
given tiddler (other than clicking each one one-at-a-time)?

I looked at the plugin docs and searched here for "+uncheck +all" to
no avail

thanks,
DP

Eric Shulman

unread,
Jun 18, 2007, 9:09:33 PM6/18/07
to TiddlyWiki
> Is there an easy way to uncheck all checkboxes (checkboxPlugin) of a
> given tiddler (other than clicking each one one-at-a-time)?

see
http://www.TiddlyTools.com/#ChecklistScript

specifically, look at the 'onclick' inline script labelled "reset
checklist"

enjoy,
-e

Dave Parker

unread,
Jun 19, 2007, 12:40:21 PM6/19/07
to TiddlyWiki
> see
> http://www.TiddlyTools.com/#ChecklistScript
>
> specifically, look at the 'onclick' inline script labelled "reset
> checklist"


Thanks again Eric -

It worked. I just copied the whole script, labelled each checkbox
just [_(a)], [_(b)], etc and changed the case values to "a", "b", etc
and it worked great.

One question: (don't answer this if you're pressed for time - its
just for interest)

If I do the same for another checklist in the same TW but a different
tiddler, can I re-use the "a", "b" labels, or are these global
variables. I suspect they're global because I noticed that when I
check any of the boxes a little tab appears at the top of the tiddler
labelled the same as the label of the checkbox. I does that mean that
if I check that checkbox in one tiddler, it will automatically be
checked in all tiddlers?

Once again, thanks for teaching :-)

DP

Eric Shulman

unread,
Jun 19, 2007, 1:16:59 PM6/19/07
to TiddlyWiki
> just [_(a)], [_(b)], etc and changed the case values to "a", "b", etc
> and it worked great.
>
> If I do the same for another checklist in the same TW but a different
> tiddler, can I re-use the "a", "b" labels, or are these global
> variables. I suspect they're global because I noticed that when I
> check any of the boxes a little tab appears at the top of the tiddler
> labelled the same as the label of the checkbox. I does that mean that
> if I check that checkbox in one tiddler, it will automatically be
> checked in all tiddlers?

Nope. The "(a)" portion of the checkbox syntax means that the
checkbox state is tracked by **tagging the current tiddler** (using
"a" as the tag value). If you use the same syntax in another tiddler,
it will add the "a" tag on THAT tiddler, so that each checkbox
instance is tracked separately.

If you DO want multiple checkboxes to share the same setting, you can
add an explicit tiddler name to the checkbox tagging syntax. For
example:
[_(SettingsTiddler:a)]
will always add the "a" tag to [[SettingsTiddler]] regardless of the
tiddler in which the checkbox is actually located.

Note also that CheckboxPlugin has recently been updated to support
tracking checkbox states using custom tiddler fields (in addition to
the current tracking via 'inline X', cookies, or tags). By using
custom tiddler fields instead of tags, it lets you keep track of the
checkboxes without cluttering up your tag space with what are
essentially internal 'flag' values. It works almost the same as tag-
based tracking, with a slightly different syntax:
[_(fieldname@tiddlername)]
if you omit the tiddlername (but keep the @ sign), it defaults to the
current tiddler:
[_(fieldname@)]

HTH,
-e

Reply all
Reply to author
Forward
0 new messages