CheckBoxPlugin two boxes √ if fieldvalue=true and √ if fieldvalue=false

61 views
Skip to first unread message

Måns

unread,
Jun 18, 2011, 11:14:20 AM6/18/11
to TiddlyWiki
Hi TwWizards

I'd like to have two checkboxes reflecting the two possible states
(true and false) for a custom field.

If I uncheck one the other will be checked...

Quasi code:

Yes[x(if tiddler.option=true)] No[x(if tiddler.option=false)]

How do I do it?

Cheers Måns Mårtensson


Message has been deleted

Tobias Beer

unread,
Jun 18, 2011, 12:10:42 PM6/18/11
to TiddlyWiki
I'm curious, what would you need that for?

Cheers, Tobias.

Måns

unread,
Jun 18, 2011, 12:30:52 PM6/18/11
to TiddlyWiki
Hi Tobias

> I'm curious, what would you need that for?

I'm using Eric's CheckBoxPlugin and I made a table:
|>|Customer|>| |Date|>||
|>|Place|>||Our ref.|>| |
|Heat [_] |Water [_] |Cable [_] |Div. [_] |To be continued |Yes[_]|
No[_] |
|>|Casenumber |>||>|Address is to be posted individually [_] |Invoice
individually [_] |

I will replace all checkboxes with: [_(decriptive_fieldname@)] e.g
Heat [_(heat@)] etc...
My problem is: "|To be continued |Yes[_]|No[_] |"

The easy solution is just to use one checkbox for the option, which
can only have two outcomes: true or false, however I want to have one
cell for each option:
|Yes[x(address@)]|No[_(address@)] |

If one checkbox is checked the other checkbox will be unchecked...

Therefore I need sth like: "Yes [x(decriptive_fieldname@) =true] No
[x(decriptive_fieldname@) =false]"


Cheers Måns Mårtensson

Tobias Beer

unread,
Jun 20, 2011, 7:47:39 AM6/20/11
to TiddlyWiki
Hi Måns,

If it's non-critical to use two seperate columns, I would go with
merging those adjecent cells (for the time being) via |>| ...
otherwise, I guess, what you're asking is for Eric to implement a kind
of "inverted mode" for CheckBoxPlugin.

Cheers, Tobias.

Julian Knight

unread,
Jun 20, 2011, 9:12:58 AM6/20/11
to tiddl...@googlegroups.com
Really it would be better for it to display RADIO buttons rather than a pair of checkboxes as this would be the expected user interface. Two checkboxes mutually exclusive would be confusing to many users.

What I'd like to see is a generic INPUT macro that could handle ANY input type ;)
If it had the ability to tie the input to custom FIELDs (and preferably the tag list, maybe the title as well, even the body!) we would have a generic form interface for TW. I did start to work on this a while back but quickly ran out of time before I got very far.


Måns

unread,
Jun 20, 2011, 9:43:38 AM6/20/11
to TiddlyWiki
Hi Tobias

>I guess, what you're asking is for Eric to implement a kind of "inverted mode" for CheckBoxPlugin.

Yes. I believe you are right.
I solved the problem by using tags instead of fields.
Eric's CheckboxToggleTag transclusion did the trick:

|To be continued |Yes <<tiddler CheckboxToggleTag with:active done>>|
No <<tiddler CheckboxToggleTag with:done active>> |

Cheers Måns Mårtensson

rakugo

unread,
Jun 20, 2011, 11:24:31 AM6/20/11
to TiddlyWiki
On Jun 20, 2:12 pm, Julian Knight <jk.goo...@knightnet.org.uk> wrote:
> Really it would be better for it to display RADIO buttons rather than a pair
> of checkboxes as this would be the expected user interface. Two checkboxes
> mutually exclusive would be confusing to many users.
>

I was about to say exactly this...
Jon

Måns

unread,
Jun 20, 2011, 11:45:18 AM6/20/11
to TiddlyWiki
Hi Julian and Jon

> What I'd like to see is a generic INPUT macro that could handle ANY input
> type ;)
> If it had the ability to tie the input to custom FIELDs (and preferably the
> tag list, maybe the title as well, even the body!) we would have a generic
> form interface for

+1

I believe Alex Hough did sth with radiobuttons in his OMMs project...
Maybe they were toggling tags??
https://dl.dropbox.com/u/1316865/AlexHough/SCiO/OMM.Sept2010/ommDirector.html

Cheers Måns Mårtensson

Måns

unread,
Jun 20, 2011, 1:17:38 PM6/20/11
to TiddlyWiki
> Maybe they were toggling tags??https://dl.dropbox.com/u/1316865/AlexHough/SCiO/OMM.Sept2010/ommDirec...

Nope - it is using textdata via DataTiddlerPlugin + FormTiddlerPlugin.
It seems as if Alex has been experimenting with RatingMacro by Tobias.
I'm not sure if it uses radiobuttons as well...

Cheers Måns Mårtensson
Reply all
Reply to author
Forward
0 new messages