Question
How can we avoid the "edit" screen? Assuming we have gathered all the data from the user in the html form, we don't want to force them to "edit" twice. We want the user to click on "create" and then instantly return to the html form where they can create another topic.
Environment
Note: Comments pulled and editied from my awkward post to
AnApplicationWithWikiForm
--
DanielMalcor - 13 Jun 2006
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.
You can use the
save script instead of the
edit script to avoid the edit screen.
--
PeterThoeny - 13 Jun 2006
That was the first thing I tried. It does avoid the
edit screen, but it does not return you to the HTML form page. I keep thinking there is a trivial little trick, but all I can think of is some special option to
save that reads in the URL you "saved" from and returns you to it.
--
DanielMalcor - 14 Jun 2006
Reading
TWikiScripts, what you ask for does not yet exist. You'd need a new
redirect parameter to the save script that tells save where to redirect. Please feel free to create a feature proposal in the
Codev web.
--
PeterThoeny - 14 Jun 2006
As an alternative, look into the
CommentPlugin features, it allows you to capture content in a structured way, and add it to a TWiki table for example. By default, you stay in the same topic when you submit a comment plugin form.
--
PeterThoeny - 14 Jun 2006
I have learned a lot in the last few hours about templates and the comment plugin. What I cannot figure out is how to get the OUTPUT template to put out FORM fields (with the NOP I have been able to keep the META:FIELDs from disapearing from the Template, but I cannot get them to actually put form data into the new Topic):
%COMMENT{ type="statusreport" target="%INCLUDINGWEB%.%WIKINAME%%SERVERTIME{"$year$mo$day"}%StatusXXXXXXXXXX"}%
%TMPL:DEF{PROMPT:statusreport}%<br />
---++ Create a New Report Item
*Summary:* <input type="text" name="Summary" size="100" value="" /> %BR%
*Notes:* %BR% <textarea name="Notes" cols=100 rows=10 /></textarea> %BR%
*Date:* <input type="text" name="Date" size="12" value="%SERVERTIME{"$year/$mo/$day "}%" />
<input type="hidden" name="onlywikiname" value="on" />
<input type="hidden" name="Who" value="%SPACEOUT{%WIKINAME%}%">
<FONT color="red">Create Status Item: <input type="submit" value=" Create "/ ></FONT>
%TMPL:END%
%TMPL:DEF{OUTPUT:statusreport}%
Below should be form data:
--------------------------
%NOP%%META:FORM{name="FormStatusItems"}%
%NOP%%META:FIELD{name="Date" attributes="" title="Date" value="%URLPARAM{"Date"}%"}%
%NOP%%META:FIELD{name="Who" attributes="" title="Who" value="%URLPARAM{"Who"}%"}%
%NOP%%META:FIELD{name="Summary" attributes="" title="Summary" value="%URLPARAM{"Summary"}%"}%
%NOP%%META:FIELD{name="Notes" attributes="" title="Notes" value="%URLPARAM{"Notes"}%"}%
%TMPL:END%
--
DanielMalcor - 15 Jun 2006
I'm thinking the answer is somewhere in the idea that the Comments Plugin does not call other plugins. We have gone a diffrent way...
--
DanielMalcor - 22 Jun 2006