Editing several fields in a "dashboard" for a list of tiddlers

78 views
Skip to first unread message

myfta

unread,
Feb 9, 2020, 12:42:42 PM2/9/20
to TiddlyWiki
OK, I'm new here. I have a group of tiddlers with the same tag.

I want to be able to list these in a "dashboard" tiddler so that I can edit some of the fields within the individual tiddlers.

The $edit-text widget and the $list widget seem to have the right options, but no examples of how to use them (for a newbie). Ideally, I want to nest $edit-text inside $list so give me a table of fields from a set of tiddlers that can be edited. Or is there a better way?

Thanks.

Eric Shulman

unread,
Feb 9, 2020, 1:20:35 PM2/9/20
to TiddlyWiki
On Sunday, February 9, 2020 at 9:42:42 AM UTC-8, myfta wrote:
OK, I'm new here.

Welcome!
 
I have a group of tiddlers with the same tag.
I want to be able to list these in a "dashboard" tiddler so that I can edit some of the fields within the individual tiddlers.
The $edit-text widget and the $list widget seem to have the right options, but no examples of how to use them (for a newbie). Ideally, I want to nest $edit-text inside $list so give me a table of fields from a set of tiddlers that can be edited. Or is there a better way?

The $list widget uses the "filter" syntax to specify a set of tiddlers to operate on.  You can think of the list widget as a "loop" control.  For each tiddler that matches the filter, the <<currentTiddler>> variable is set for use inside the <$list>...</$list>.  For your purposes, let's assume you are working with tiddlers tagged with "sometag".  Thus, you would write:
<$list filter="[tag[sometag]]">
  <
<currentTiddler>><br>
   ... more stuff goes here ...
</$list>

In the above example, the $list widget loops through all tiddlers that match the specified tag, and displays the title of each matching tiddler, one per line.

The $edit-text widget creates a text input control that allows you to display and modify the value in a specified field.  Entering/changing the text in an input control immediately changes the text value stored in the corresponding field, without needing any "ok/cancel" button.  For your purposes, let's assume you want to change three fields named "foo", "bar", and "baz".  To do this, you would write:
enter foo: <$edit-text field="foo" /><br>
enter bar
: <$edit-text field="bar" /><br>
enter baz
: <$edit-text field="baz" /><br>

Notes:
* By default, if no "tiddler" parameter is specified, the <<currentTiddler>> is implied.
* Each widget ends with "/>" rather than the usual ">".  This is an abbreviated form of <$edit-text ...>...</$edit-text>.  We can use this syntax because the $edit-text widget does not need any content *within* the widget.
* The "enter xxx:" text that appears before the $edit-text widget is just normal content that will be displayed as a "prompt" in front of each input field
* The <br> following each $edit-text widget ensures that each input control appears on a line by itself.
* There are other $edit-text parameters that can be helpful here, such as "size" and "default".  I leave this to you to experiment and discover.

Combining the $list and $edit-text from above, and adding a little bit of extra "formatting", we can get something like this:
<$list filter="[tag[sometag]]">
   <
<currentTiddler>>:<br>
   
<blockquote>
      enter foo: <$edit-text field="foo" />
<br>
      enter bar: <$edit-text field="bar" />
<br>
      enter baz: <$edit-text field="baz" />
<br>
   
</blockquote>
</$list>

Note that <blockquote>...</blockquote> is a normal HTML syntax rather than a TiddlyWiki widget (there's no leading $).  This shows that you can freely mix HTML and TiddlyWiki syntax together to achieve the desired display of output.  Of course, you might want a different appearance of the output, but again, I leave that to you to experiment and discover.

Hopefully, this is enough to get you started in the right direction.  If you have more questions, don't hesitate to ask.

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)







myfta

unread,
Feb 9, 2020, 2:13:19 PM2/9/20
to TiddlyWiki
Thanks, Eric. That's perfect. As I know html, I now have it all neatly formatted in a table with editable fields. A very helpful guide for starters.

Mohammad

unread,
Feb 9, 2020, 2:45:21 PM2/9/20
to TiddlyWiki
There several good plugins and code for these kind of tables like

TiddlyTables from Alan Aldrich: http://tiddlytables.tiddlyspot.com/

--Mohammad

myfta

unread,
Feb 9, 2020, 3:35:00 PM2/9/20
to TiddlyWiki
Thanks, Mohammad. now I am spoilt for choice.



On Sunday, 9 February 2020 17:42:42 UTC, myfta wrote:

Mat

unread,
Feb 9, 2020, 3:49:34 PM2/9/20
to TiddlyWiki

HansWobbe

unread,
Feb 9, 2020, 4:48:15 PM2/9/20
to TiddlyWiki
@ Mat:

Very nice!

Thanks for sharing and reminding.

Cheers,
Hans

On Sunday, February 9, 2020 at 3:49:34 PM UTC-5, Mat wrote:
Reply all
Reply to author
Forward
0 new messages