Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease04x00x00
TWiki plugins:  
Server OS: RedHat ES3
Web server: Apache
Perl version: perl-5.8.0
Client OS: Any
Web Browser: Any
Categories: Forms

Note: Comments pulled and editied from my awkward post to AnApplicationWithWikiForm

-- DanielMalcor - 13 Jun 2006

Answer

ALERT! 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

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2006-06-22 - DanielMalcor
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.