Question
I want to combine the function which creates a new topic with !
%COMMENT{type="bulletabove"}% such that the new topic is added to the bottom of a bullet list on the parent page (directly above) at the same time as being created. Can anyone help me with this?
For example, I would like something looking like this on my page:
- PreviouslyAddedTopics
- OtherTopics
PLEASE DON'T ACTUALLY USE THIS BUTTON
When you enter a new topic into the text box (eg NewTopicExample) and hit the button, the new topic would be created as a child of the current topic (I can do this bit) and the new topic name would be added to the current topic as a bullet list above the text box, eg:
- PreviouslyAddedTopics
- OtherTopics
- NewTopicExample
PLEASE DON'T ACTUALLY USE THIS BUTTON
I make the text box and create topic button like this:
<form action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/">
<input type="text" name="topic" size="32" />
<input type="hidden" name="topicparent" value="%TOPIC%" />
<input type="submit" value="Create Topic" />
</form>
....but I don't know how to create the bullet list too. Hope that clarifies the request.
Environment
--
TamsinTweddell - 30 Jul 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.
I don't know what you mean, be more clear.
--
GrazianoMisuraca - 31 Jul 2007
Check out the
CommentPlugin. It has all the functionality you need for adding an item to a bullet list.
If you want to create and save a topic by hitting the button you need to look at
TWikiScripts.
The
BlogAddOn does soemthing quiet similar to your request.
If you comment a blog post a customized comment template creates a comment topic and adds the comment to this topic in one run. No edit/save cycle needed.
It would be easier though, if you just add the topic name to the list and then create the topic by clicking on the ?
--
CarloSchulz - 02 Aug 2007
It appears that you are asking if TWiki can do two things with one form: create a new topic
and post a comment (to add topic to bullet list). As far as I know, that is not possible. However, almost the same thing could
appear to happen if you generated the bullet list using a search and used the form to add a new topic that that had some unique identifier which the search would find. By including a
=redirectto parameter in the form, you would immediately return to the original topic and your new topic would show up in the list.
--
LynnwoodBrown - 02 Aug 2007
How about instead you add a create topic link, but in the topic that it's in, add an automatically generated key.
from
TreePlugin, That's exactly how we do it here.
---+!! %MAKETEXT{"Welcome to the [_1] web" args="<nop>%WEB%"}%
This is the web where any topics QA related are placed.
%TREE{excludetopic="Web*" formatting="outline" format="* [[$topic][$spacetopic]]" levelprefix=" " startlevel="1"}%
[[WebTopicCreator][Create a new Topic]]
--
GrazianoMisuraca - 03 Aug 2007
I haven't tried it, yet, but I believe the answer to what you want is here:
http://www.webmasterworld.com/forum23/1052.htm
"submitting two forms with one button". Also,
http://www.crossedconnections.org/w/?p=7&more=1&c=1
"Multiple form submit with one button: Ajax to the rescue"
This is something I've wanted to do, too. I'll make an effort to try this out. If I get it to work, I'll post back here.
--
TroyGoodson - 31 Mar 2008
Here's a first cut
CreateTopicAndAttachInOneStep
--
TroyGoodson - 08 Apr 2008
Troy, very

!
--
PeterThoeny - 08 Apr 2008