New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Missing functionality: Answered

how to create multiple topics from a single HTML form

I would like to have a single HTML form that generates a topic tree of about six different topics. The user would enter a wikiname into the form and the new topics would have topic names based on the name entered by the user. For example:

When the user clicks the button, NewNameHome is created along with NewNameOne, NewNameTwo ... which are children of NewNameHome

I have already written a script that can generate the topic tree by calling save from the command line, makeing use of existing templates; however, I have been unable to call this script from the form and still have the save command work.

Perhaps I am approaching this problem the wrong way.

-- ChrisPurves - 03 Jun 2009

Either use javascript code (probably XHR, which triggers some /bin/save urls) or write a plugin, that does the job on the server side. The native Foswiki does not have this functionality.

-- OliverKrueger - 03 Jun 2009

We use the TopicCreatePlugin to do something similar. When the user submits a form, it calls the save script with a template. In that template are a set of %TOPICCREATE{ ... }% macros that go off and create a number of other topics based on other templates.

-- AndrewJones - 04 Jun 2009

I thought this plugin was dumped due to a significant security hole (back in the old tmwiki times already)?! Was that hole fixed?

-- OliverKrueger - 04 Jun 2009

Erm maybe, since when I ported it to Foswiki I re-wrote a lot of the code to use Foswiki::Fuc. What was the security hole? Can you point me at any topics on that mentions it?

We have been using it on a company intranet for years without any problems.

-- AndrewJones - 04 Jun 2009

Andrew, I used your TopicCreatePlugin as you suggested and was able to get it to do what I wanted. Thank you.

-- ChrisPurves - 04 Jun 2009

QuestionForm edit

Subject Missing functionality
Status Answered
Topic revision: r7 - 04 Jun 2009, ChrisPurves - This page was cached on 19 Aug 2018 - 03:47.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy