One solution I came up with is as below.

Note here the two fields are name (fone) and colorsheme (ftwo)

\define tmpTid() myTiddler

<$vars   disabled={{{[<tmpTid>get[name]!is[blank]then[no]else[yes]]
:intersection[<tmpTid>get[colorscheme]!is[blank]then[no]else[yes]]
~[[yes]]}}} >
<$button actions=<<newPalette>> disabled=<<disabled>>>Create</$button>
</$vars>

This is an *ugly *solution! I am looking for a simpler, more semantic and
easy to follow!

Note ii: the button is working if two fields are not empty at the same time!


Best wishes
Mohammad


On Sat, Mar 20, 2021 at 8:00 PM Mohammad Rahmani <[email protected]>
wrote:

> *Question*: There is a tiddler say myTiddler, a button shall be visible
> if and only if both fields of fone and ftwo  have non empty values
>
> I know this can be done using two $list widgets but I am looking for a
> simpler more semantic solution!
>
>
> *Pseudo code*
>
> <$vars disabled={{{ if [[myTiddler]get[fone]!is[blank]]  AND
>  [[myTiddler]get[fone]!is[blank]] then NO else YES }}} >
>
> <$button disabled=<<disabled>> > Create </$button>
>
> </$vars>
>
>
> What do you think?
>
>
> Best wishes
> Mohammad
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMCvFm1nsfcnw%3DYJPwz%2BR3dJ8XNy5%3DwNF5%3DNztt0n42N-w%40mail.gmail.com.

Reply via email to