Tags:
create new tag
, view all tags

Question

Is there a way to bypass the 'Edit' of a new topic and just go straight to viewing the newly created topic?

I have a web-form that I am using to create topics from a chosen template. The template contains all that is required to create the topics which have an EditTable? in them to edit the actual values in a table.

Having to put a note about "Click 'Save' when the 'Edit' screen appears" below the "Create" button just seems a bit Mickey-mouse (no offense to Disney fans).

Environment

TWiki version: TWikiRelease04x01x01
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat?
Web server: Apache
Perl version: 5.8
Client OS: Windows XP
Web Browser: Firefox
Categories:  

-- DuncanKinnear - 06 Mar 2007

Answer

It is quite easy actually:

  • Use a save action in your form, for instance:
    <form name="newtopic" id="newtopic" action="%SCRIPTURLPATH{save}%/%BASEWEB%/">
    
  • Make sure all mandatory fields are prefilled. If I have a mandatory field "Author", add a hidden field:
    <input type="hidden" name="Author" value="%WIKIUSERNAME%" />
    

-- ArthurClemens - 06 Mar 2007

Excellent! Works a treat, thank you.

-- DuncanKinnear - 07 Mar 2007

 
Change status to:

Topic revision: r3 - 07 Mar 2007 - 02:06:32 - DuncanKinnear
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback