Question
I want to use a form on a twiki site where a user can input some things and after he submitted it should be appended into a table which is on a different twiki side. Is that possible and if yes, how??
-- Edit:
THX the book example was that for what i was looking for (although I doesn't want to have a new TWIKI site for each dataset but its better than nothing). Is it possible to force a save action after a user has clicked the submit button? So that he doesn't have to click save again to save the TWIKI dataset side???
Environment
--
ThomasWMueller - 26 Sep 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Yes, that's possible, and quite a typical use case for TWiki. See
TWiki.FormattedSearch for some quick examples, and
TWiki.TWikiForms for details. There's a full example at
Sandbox.SearchBookTitles.
Feel free to reopen the issue if you need more assistance, but if so, you'd have to give more details on what you want to achieve.
--
HaraldJoerg - 26 Sep 2007
You also can use a custom
CommentPlugin template. See
EditActionItems example. This approach is more simple, but does not have the reporting flexibility of TWikiForms based applications.
--
PeterThoeny - 27 Sep 2007
Copying Thomas' extended question:
| THX the book example was that for what i was looking for (although I doesn't want to have a new TWIKI site for each dataset but its better than nothing). Is it possible to force a save action after a user has clicked the submit button? So that he doesn't have to click save again to save the TWIKI dataset side??? |
You do not have to have a new TWiki web for each dataset! It is just
recommended for big datasets and their TWiki applications, but I am running several applications with different forms and different searches within one web without problems. The
%SEARCH{...}% is flexible enough for that: You can search for pages having the same parent, starting with some string, backlinking to some topic, and so on.
Regarding the possibility to save one click: Yes, this is possible, especially in a environment where everything is "in the form". Just use
save instead of
edit in the form's
action URL, and check out
TWiki.TWikiScripts#save for the possible parameters and an explanation of TWiki's behaviour when it comes to supplying parameters to the forms. This might need some experiments to wrap your head around, and maybe an upgrade to 4.1 (or the upcoming 4.2), since in 4.1 quite a few bugs in the form initialisation code have been fixed.
--
HaraldJoerg - 28 Sep 2007