Eric,

This intriguing example of yours begs the Question is the button widget 
effectively acting as if it were onclick in html for the three radio 
buttons within it? and thus any radio button triggers the named actions=

It makes me think we may be able to use this more extensively, ideally to 
leverage html forms and other code out their, and if perhaps we had the 
ability for an action to be a php/html put and get etc... 

Why?
I am convinced just beyond my level of skill there is a way to use a html 
form built into tiddlywiki to allow login (on a php server) and checkout a 
tiddlywiki for edit, if not already, then a check back in. This would allow 
for serial edits of a tiddlywiki, a poor man's alternative to a multi-user 
environment.

Regards
Tony





On Saturday, April 18, 2020 at 12:53:05 AM 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/7356d463-4c2d-4c66-befe-fd03dab0b7bf%40googlegroups.com.

Reply via email to