Need help with forms

151 views
Skip to first unread message

magev958

unread,
May 31, 2012, 4:54:53 PM5/31/12
to tiddl...@googlegroups.com
Hi tiddlywiki geniuses out there, I've a tricky question for you :)
I'm working on a wiki who's target audiences is 55+ ladies more or less afraid of computers ;) I need to make a very advanced form so it gets very, very easy for them to add new content. Ideally I'd like to have this simple layout:
- username (I have managed this :) )
- a couple of checkboxes for tags: tag1 tag2 tag3 (only one at a time)
- depending on choies in first tag-row I'd like new tags to display: e.g. if tag1 is chosen then tag4 tag5 tag6, if tag2 i chosen then tag7 tag8 (multi-choies)
- next the text box
- save-button

Clicking on the save-button creates a new tiddler with the text-box-content and tagged with the chosen tags. Is this possible?
Thanks for any help

PMario

unread,
Jun 1, 2012, 9:34:02 AM6/1/12
to TiddlyWiki
Hi magev,

I could imagine a combination of ToggleTagPlugin [1] and ShowWhen /
HideWhen plugin [2].
To get a bit more flexibility you could add DeliciousTaggingPlugin [3]
for edit mode too.

I think with them it would be possible to create a powerfull, yet
simple and flexible solution.

[1]&[2] work in TW view mode.
[3] only works in TW edit mode.

hope this helps
-mario

[1] http://mptw.tiddlyspot.com/#ToggleTagPlugin
[2] http://mptw.tiddlyspot.com/#HideWhenPlugin
[3] http://jackparke.googlepages.com/jtw.html#DeliciousTaggingPlugin

magev958

unread,
Jun 14, 2012, 7:11:54 AM6/14/12
to tiddl...@googlegroups.com
Thanks :)
I haven't seen that one before, I'll give it a try

magev958

unread,
Feb 16, 2013, 8:26:29 AM2/16/13
to tiddl...@googlegroups.com
Hi again
I have manage a simple farm with tags, username & text using the ToggleTagPlugin. But when I click any tag-checkbox i erase everything I have written in the username-box and text-box. 

PMario

unread,
Feb 16, 2013, 10:35:39 AM2/16/13
to TiddlyWiki
Hi,
Can you provide a minimal test case for us. Otherwise I think there
will be no answers.
-m

magev958

unread,
Feb 16, 2013, 6:02:26 PM2/16/13
to tiddl...@googlegroups.com
Yes of course, sorry. Here is a link to a minimal test file - https://dl.dropbox.com/u/955759/forms.html
It creates a new tiddler with the hidden tag "information" but I just can't get the checkboxes to create a new tag in it. I also tried the FormTiddlerPlugin - http://tiddlywiki.abego-software.de/#FormTiddlerPlugin and got it to work with data fields. But I have other TW with SharedTiddlerPlugin - http://yakovl.bplaced.net/TW/STP/STP.html/#SharedTiddlersPluginInfo and I can't get them to fetch basted on data fields.

My head is empty, I really need this to work, I appreciate any help or any direction You can point me in

PMario

unread,
Feb 18, 2013, 9:53:19 AM2/18/13
to TiddlyWiki
Hi magev,

I will probably need some forms myself for my tweb-at-home [1]
project, so I thought, I'll give it a try.
I created a "quick and dirty" mashup [2]. I did use the phpform.org to
create a form, similar to yours, just to see, how they do the html
structure + css styling / theming ... I did remove all IDs since they
don't work with TW, if you open more than one form at the same time.
There is only one ID left, which needs ot be removed in the future ...

stackoverflow pointed me to a "form to json" object serializer, that
creates a nice javascript object, that can be easily used to create a
tiddler. It may be even possible to create a form, that mimics the
whole tiddler structure. the important parts are <input
name="elementName" ...

Since you want to do some form validation, I don't want to do it on my
own, so I used jQuery.validation plugin [3], which makes it much much
easier and the code imo is much more readable too. Because it isn't
part of the form.

As I wrote: my testpage [2] is exactly that. I'll move it to a propper
place, when it is more mature.

The validation plugin doc [4] is a bit confusing, so it'll need some
more testing. ...

have fun!
mario

[1] http://tweb-at-home.tiddlyspace.com
[2] http://aassddff.tiddlyspace.com/#online-form-creator%20form
[3] https://github.com/jzaefferer/jquery-validation
[4] validation docs: http://docs.jquery.com/Plugins/Validation

magev958

unread,
Feb 20, 2013, 5:09:16 AM2/20/13
to tiddl...@googlegroups.com
Wow, that was waay more advanced than I'd imagined :) But I still can't get Your form to create a new tiddler, I only get a message "data: form" ?

PMario

unread,
Feb 20, 2013, 8:22:01 AM2/20/13
to TiddlyWiki
On Feb 20, 11:09 am, magev958 <magnus.ev...@gmail.com> wrote:
> Wow, that was waay more advanced than I'd imagined :) But I still can't get
> Your form to create a new tiddler, I only get a message "data: form" ?

I did a console.log() in the Save handler. If you open FireBug or
DevTools in your browser, you will see a javascript object, that
contains the form data. This data can be used to create a tiddler.

I did change the example. Save actually does save now :)

-m
Reply all
Reply to author
Forward
0 new messages