• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3594: Can't save template topic with mandatory form fields

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   minor 4.2.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

The TWikiForms definition has an "M" attribute to declare a form fields as manditory. When you create a TWiki forms based TWiki app you typically want to create a template topic with empty fields, but wwant to require users to fill in the details. That is, it should be possible to override the manditory flag just for the template topic.

Not sure what the best spec is. Possibly treat topics with forms differently if listed in the WEBFORMS preferences settings?

-- TWiki:Main/PeterThoeny - 10 Feb 2007

Another approach would be to save the template topic with a value for the mandatory field, but clear that value when the template is instantiated in a new topic. That would avoid having to handle template topics specially when they are being defined.

This is a real problem for twiki application authors, and should be fixed.

CC

The documentation is extremely misleading in this area. When you create a new topic based on a template with an attached form, you should use the formtemplate parameter to save (see TWikiScripts).

Changing this to a documentation bug, as it isn't at all clear.

Doc improved, closed.

CC

Re-opening since the actual problem is not resolved. Add developers would like to specify mandatory fields, but still leave the fields empty in the template. A doc only solution is possible if you use an HTML form to create new topics, but it does not work if you want to rely on the WebTopicEditTemplate (e.g. clicking on a questionmark link.)

-- PTh

Note that the doc is clear that any value in the form attached to the template topic is carried into the generated topic. That includes mandatory fields. Since you cannot save a topic without filling in mandatory field values, that means you have to do "something special" when a topic template including a mandatory field is instantiated. Every "something special" we add makes the code more complex, and the interface less intuitive. I would prefer to disallow forms on template topics, than add any more cleverness for mandatory fields.

The doc is clear on what you have to do to include mandatory fields, and IMHO we do not need more code to solve this.

If you want to push the point, please open a new report for the enhancement; we need to keep this "Waiting for Release" so we can track it into the release package.

CC

OK, let's follow up with a new item: Item4261

-- PTh

ItemTemplate
Summary Can't save template topic with mandatory form fields
ReportedBy TWiki:Main.PeterThoeny
Codebase 4.1.1
SVN Range TWiki-4.1.1, Fri, 09 Feb 2007, build 12817
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:14119
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r9 - 2008-01-22 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback