create new tag
, view all tags

Implemented: TWiki Form with Label Type

For some applications it is useful to restrict the change of some form fields. TWikiForms has now a new type label to do that; a form field of type label cannot be changed when you edit the topic.

For example, this form definition has a text field and a label field:

Name Type Size Values Tooltip message
Source text 32   blah blah...
Published label 1   filled automatically

The label field can be set programmatically or with URL parameters in edit mode, see TWikiTemplates for details.

Usage example? Form system where content needs to be approved before it gets published. A label field named "Published" is set to "no" when you create a new entry. An index topic lists all to-be-published topics based on a %SEARCH{...}; the topic has a view access restriction set to the group with publishing rights. The search format includes a link to edit the topic and has ?Published=Yes appended to the URL. The SEARCH in the official index shows all entries that have the "Published" field set to "Yes", e.g. excludes the not yet published entries.

There are ways to defeat the system, but it is "good enough" for some applications.

Is in TWikiAlphaRelease and at TWiki.org; needs to be documented.

-- PeterThoeny - 04 Mar 2003

TWikiForms docs are now updated.

-- PeterThoeny - 25 Apr 2004

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-04-25 - PeterThoeny
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.