Difference: TWikiForms (7 vs. 8)

Revision 82001-09-07 - MikeMannix

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

Form Templates

>
>

TWiki Form Templates

 
Changed:
<
<
Include form-based input in topics, with unlimited, user-selectable forms per web; values stored as Meta Data
>
>
Form-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topic
 

Overview

By adding form-based input to free-form content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, the form appears in edit mode, and the contents are rendered as a table when viewing the actual page. When editing, can switch forms, if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved.

Changed:
<
<
Form Templates replace TWikiCategory Tables from the previous version of TWiki.
>
>
Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.

Changes from the Category Table System

Form Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.

Main changes from TWikiCategoryTable:

Form Templates Category Tables
defined in topics defined in templates
many forms per web one table per web
saved as Meta Data saved as HTML
Change & Add Form buttons UseCategory radio button

Importing Existing Category Table Data

On upgrading from the previous TWiki, a Form Template topic has to be built for each web that used a Category Table, recreating the fields and values from the old twikicatitems.tmpl. The replacement Form Template must be set as the first item in the WebPreferences variable =WEBFORM. If missing, pages will display, but attempting to edit results in an error message.

The new Form Template system should work with old Category Table data with no special conversion. Data is assigned to Meta variables the first time an imported topic is edited and saved in the new system.

NOTE: If things aren't working correctly, there may be useful entries in data/warning.txt.

 

Form Template Elements

Line: 38 to 59
 
  1. Save the topic.

Changed:
<
<
Example: Form Template
>
>
Example: WebFormTemplate from the TWiki.Know web
 
Changed:
<
<
Name: Type: Size: Values: Tooltip message:
TopClass select 1 Select one..., Private, Public must fill
Target checkbox+buttons 3 1, No.2, No.3 Select OS
Version text 16   OS version
>
>
Name Type Size Values Tooltip message
| TopicClassification | select | 1 | NoDisclosure, PublicSupported, PublicFAQ | blah blah... | | OperatingSystem | checkbox | 3 | OsHPUX, OsLinux, OsSolaris, OsWin | blah blah... |
OsVersion text 16   blah blah...
 

Defining a Form in One Topic

Changed:
<
<
Example: WebFormTemplate of the TWiki.Know web:
>
>
Example: WebFormTemplate from the TWiki.Know web
 
Changed:
<
<
Name: Type: Size: Values: Tooltip message:
>
>
Name Type Size Values Tooltip message
 
TopicClassification select 1 NoDisclosure, PublicSupported, PublicFAQ blah blah...
OperatingSystem checkbox 3 OsHPUX, OsLinux, OsSolaris, OsWin blah blah...
OsVersion text 16   blah blah...
Added:
>
>
 

Defining a Form in Multiple Topics

Changed:
<
<
The form template can also be defined in an alternative way by using more then one topic:
>
>
The Form Template can also be defined in an alternative way by using more then one topic:
 
Changed:
<
<
  • A form template topic defines the form
  • Values of fields that have more then one value, e.g. of type radio, select and checkbox can be defined by field value template topics
>
>
  • A Form Template topic defines the form.
  • Values of fields that have more then one value - radio, select, checkbox - can be defined by field value Template topics.
 
Changed:
<
<
Code from:
>
>
Code from:
 
  • WebFormTemplate of the TWiki.Know web:
Changed:
<
<
Name: Type: Size: Values: Tooltip message:
>
>
Name Type Size Values Tooltip message
 
TopicClassification select 1   blah blah...
OperatingSystem checkbox 3   blah blah...
OsVersion text 16   blah blah...

  • TopicClassification topic:
Changed:
<
<
Name: Type: Tooltip message:
>
>
Name Type Tooltip message
 
NoDisclosure option blah blah...
PublicSupported option blah blah...
PublicFAQ option blah blah...
Line: 102 to 127
 
  • A default Form Template (new topics get this default form) can be provided by creating the WebTopicEditTemplate topic in a web and adding a form to it. Initial Form values can be set there.
Changed:
<
<
  • Addtionaly a new topic can be given a form using the formtemplate parameter in the URL. Initial values can then be provided in the URLs or as form values. Names being:
    • Not checkboxes - name e.g. ?BugPriority=1
    • Checkbox - namevalue=1 e.g. ?ColourRed=1. Note that all boxes with a tick must be specified.
>
>
  • Additionally a new topic can be given a Form using the formtemplate parameter in the URL. Initial values can then be provided in the URLs or as form values:
    • other than checkboxes: name, ex: ?BugPriority=1
    • checkbox: namevalue=1, ex: ?ColourRed=1.
      Boxes with a tick must be specified.
 

Creating New Topics with Forms

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiForms.