Cool solution Eric!

On Saturday, 18 April 2020 00:53:05 UTC+10, Eric Shulman wrote:
>
> On Friday, April 17, 2020 at 5:32:44 AM UTC-7, si wrote:
>>
>> I'm specifically trying to set a timestamp every time I use the radio 
>> widget to change the value of a field.
>> The only thing I can think of currently is to create my own radio widget 
>> functionality with buttons and the reveal widget. Maybe there is an easier 
>> solution?
>>
>
> You do need to use a $button widget, but don't need to use the $reveal 
> widget.  Here's a working example (tested on TiddlyWiki.com)
> \define set_timestamp() <$action-setfield timestamp=<<now 
> YYYY0MM0DD0hh0mm0ss0XXX>> />
>
> <$button class="tc-btn-invisible" actions=<<set_timestamp>>>
>    <$radio field="choice" value="one"> one </$radio>
>    <$radio field="choice" value="two"> two</$radio>
>    <$radio field="choice" value="three"> three </$radio>
> </$button>
>
> choice = {{!!choice}}, timestamp = {{!!timestamp}}
> The $radio widgets show/set the current choice, but the timestamp is set 
> by the surrounding $button widget.
>
> Let me know how it goes.
>
> enjoy,
> -e
>
> note: edited to simplify the code even further
>

-- 
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/d265fce0-9eb8-4aa0-bbd4-e6de5b57fcbb%40googlegroups.com.

Reply via email to