How Do I Create a Template Form?

881 views
Skip to first unread message

D X

unread,
Mar 11, 2018, 9:58:40 PM3/11/18
to tiddl...@googlegroups.com
I'm new to TW. I love the lightweight flexibility, but can't figure out from the provided documentation and examples how to create multi-part forms.

Here's an example of what I'd like to be able to do (this is not specifically what I want to do, but a simplified example): create an "Issue Tracking Template". I want to create a new Tiddler that has multiple sections like the following:

Section 1: Short Answer: When the issue occurred; name of the person who encountered the issue; location code where the issue occurred. This part seems like it could work with transclusion + fields.

Section 2, 3, etc.: Long Answer: I want headers or boldfaced sections like "Issue Description:", "Issue Resolution:", "Comments/Follow-Up:", etc. 

The problems with the Long Answer sections are: 

A. How can I have the headers for these sections automatically imported / templated into a new "Issue Page" when I create it so that I'm reminded to fill them out?

B. I don't want to enter / edit long paragraph sections using fields, so these seem like smaller tiddlers pulled in via tags? If so, how do you multi-transclude the text of tiddlers? If there were a way to multi-transclude (like <list-links> or <toc>, except I want the body text imported also), then how do I have the headers / prompts show up while I'm editing the target page (the new issue) so I can see the headers / prompts and interlace my response text with them?

Thanks!

TonyM

unread,
Mar 11, 2018, 11:42:47 PM3/11/18
to TiddlyWiki
DX,

I don't have a strait answer, but will let you know where I am going with this should it help.

There are multiple ways to do this and I am planning to build something similar using tabs and sub-tiddlers, but I am also developing a Form Tiddler and related tools. 
This will allow any tiddler to be given fields to define the form, and with a click copy these form fields to a give tiddler.

However in another solution I am developing if a tag or field exists in a tiddler it offers to create other related fields as needed. 
One example, a tiddler tagged view template tests for the existence of a field and displays buttons to add additional fields as needed.
In this way the field builds up from actions that create the fields rather than creating them in advance.

I am using one of the MyMenus in my first release plugin at http://tiddlywiki.psat.com.au/mymenus/ that appears on all tiddlers to create the first field, that then triggers the tools to create, edit and time stamp additional fields. That is the form is built by the process, rather than build a form and manipulate it with processes.

Arguably you could build your whole solution in a set of menus, that progressively appear as needed. This would allow you to drag and drop the menus on any wiki with MyMenus installed and the process will work.

My "Real world" application is to define a problem description through to undertaking a root cause analysis in a tiddler.

Regards
Tony



Mark S.

unread,
Mar 12, 2018, 10:47:58 AM3/12/18
to TiddlyWiki
Here's a great discussion and explainer by C Pa on templates and setting your own data structures:

https://groups.google.com/forum/#!msg/tiddlywiki/QUXd3kG1pTQ/RnYdTqLmAwAJ

Also, look for tiddler "Creating a simple Contacts DB" by Stephan Hradek at http://tw5magick.tiddlyspot.com/ . A lot of people have used this as a starting for their own projects. Note that the code is a bit out of date, and he uses his own "new tiddler" macro which is no longer necessary.

HTH
-- Mark

D X

unread,
Mar 12, 2018, 5:01:40 PM3/12/18
to TiddlyWiki
Wow. That C Pa post is super helpful for what I'm trying to do. I didn't know about the edit macros. Thank you!
Reply all
Reply to author
Forward
0 new messages