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:
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