Editing tiddler fields and creating a new tiddler

166 views
Skip to first unread message

Tierney Coren

unread,
Sep 30, 2015, 7:34:05 PM9/30/15
to TiddlyWiki
Hello.

I'm working on getting audio embedded in a tiddler with HTML5, and one criteria is that I need is a start and stop timestamp, using HTML5 audio timestamps. I can do it fine manually, using the audio tiddler example on the TW website.

I've got an input saving the contents of a tiddler. I edited the getting started tiddler and pulled the $edit-text tiddler=... that edits the title of the site, and it works great. However, I want to have a form with a URI, start time, and end time that will create a new tiddler with that data. So, I need to know two things...

1) How do I create a new tiddler through a form-tiddler?
2) How do I edit/add a tiddler field instead of the tiddler text through a form-tiddler?

Also, this would be using the same mp3 format that's used on the audio example on the TW site.

Thanks.

Tobias Beer

unread,
Oct 1, 2015, 1:53:46 AM10/1/15
to TiddlyWiki
Hi Tierney,

This might do:


Best wishes,

— tb

Tierney Coren

unread,
Oct 2, 2015, 7:49:13 PM10/2/15
to TiddlyWiki
Hey Tobias!

Thanks, that's exactly what I'm looking for! One question, though: is there a way I can write tags to the new tiddler from tags of tags? i.e. I have an Events tag that is also serving as a category, and I want to select multiple tags from its tags. Is there a way I can do this easily? Let me know if I need to make myself more clear - it's kind of abstract, and I'm not sure if I'm conveying the intended message.

Thanks,
Tierney C.

Tobias Beer

unread,
Oct 3, 2015, 2:30:08 AM10/3/15
to tiddl...@googlegroups.com
Hi Tierney,

Try something like...

|!sometags |<$tiddler title="$:/temp/newuser"><$list filter="[tag[Events]]" variable="tag"><$checkbox tag=<<tag>>><<tag>></$checkbox></$list></$tiddler>|

..with respect to New Tiddler From Form @ tb5.

In General...

<$tiddler title="$:/temp/new-tiddler-from-template">
<$list filter="[tag[SomeCategory]]" variable="tag">
<$checkbox tag=<
<tag>>><<tag>></$checkbox>
</$list>
</$tiddler>

Whereas SomeCategory could correspond to your Events tag if it worked like...
  • Context, with the contexts @call, @buy, @read, @fix tagging to it
  • Status, with the statuses #next, #future, #maybe, #done, #waiting tagging to it
  • etc...
Best wishes,

— tb

Tierney Coren

unread,
Oct 26, 2015, 11:08:56 AM10/26/15
to TiddlyWiki
Hello again.

Another question if you don't mind: how would I make the different areas (username, first name, etc.) into select boxes? Ideally they would pull their values from tiddlers with a specific tag. I've looked into the SelectWidget, but am not sure how to integrate it, as the plugin uses EditText. Any ideas?

Matabele

unread,
Oct 26, 2015, 11:02:40 PM10/26/15
to TiddlyWiki
Hi

Try something like this:

<span title="Select from Tag"><$select tiddler="$:/temp/new" field="target" default='(none)'>
<option value="null">(none)</option>
<$list filter="[all[tiddlers]tag[mytag]sort[title]]">
<option value=<
<currentTiddler>>><$view field="title"/></option>
</$list>
</$select>
</span>
<$button>
<$action-setfield $tiddler={{$:/temp/new!!target}}  blah blah blah .... />
Set Fields
</$button>

regards

Matabele

unread,
Oct 26, 2015, 11:24:24 PM10/26/15
to TiddlyWiki
Hi

I have written an $action-listops widget and a number of associated filters for manipulating lists -- this may be found here. This widget may be used to manipulate any list, including the 'tags' field. There are a number of examples in the wiki to explain their usage.

A couple of the filters are designed to select a range of items from a list or array, and add them in the desired location in another list (append/prepend.) One of these filters should match your requirements (may be used together with any other filter operators to build a suitable filter expression) -- use together with the $tags= attribute for manipulating the 'tags' field.

If this doesn't address your problem, please let me know in order that I can write another filter operator to cover this usage case.

regards

Matabele

unread,
Oct 26, 2015, 11:38:55 PM10/26/15
to TiddlyWiki
Hi

This technique may be used to store any number of values into fields of '$:/temp/new' (with $select widgets or $edit-text boxes) -- from where they may be accessed in the form of indirect references when creating your new tiddler.

regards
Reply all
Reply to author
Forward
0 new messages