On Tuesday, February 23, 2016 at 4:24:52 PM UTC-8, Andrew wrote:
>
> I'm trying to add to the list field using the checkbox widget and can't 
> figure out how to write it.
>

The $checkbox widget doesn't invoke action widgets like a $button does... 
it only allows you to set/clear a field value or add/remove a tag from a 
tiddler.... and the 'checked', 'unchecked' and 'default' params are 
supposed to be literal values to be assigned to the indicated field or tag, 
not $action-* widgets.  Thus, you can't use the $checkbox widget to do what 
you want.  

You might try using two $buttons to invoke the $action-listops... one 
button to add the item, the other to remove it.

Wrap each $button inside a $reveal to test to see if the item is present or 
not, so that only one of the buttons is displayed at any given time.

Use class="tc-btn-invisible" to remove the button styling, and use HTML 
syntax to show a fake checkbox as the label "text" to show the "checked" vs 
"unchecked" status of each button:
<input type="checkbox">
<input type="checkbox" checked="checked">

That should allow you to achieve the goal of *appearing* to have checkboxes 
that toggle a value in a list field.

-e


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2311d758-2849-48fa-986e-2cf9fb6ac130%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to