Difference: TWikiForms (8 vs. 9)

Revision 92001-09-09 - MikeMannix

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 13 to 13
 Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.

Changed:
<
<

Changes from the Category Table System

>
>

Main Changes from Category Tables

  Form Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Deleted:
<
<
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
Changed:
<
<

Importing Existing Category Table Data

>
>

Importing 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.
Line: 33 to 31
  NOTE: If things aren't working correctly, there may be useful entries in data/warning.txt.
Changed:
<
<

Form Template Elements

>
>

Defining a Form Template

A Form Template is simply a page containing your form, defined in a table where each row is one form field.

Form Template Elements

 
  • form template - a set of fields defining a form (replaces category table definition)
    • A web can use one or more form templates.
Line: 49 to 51
 
    • textarea - a text box; size is 40x10 (columns x rows)
  • field value - one or more values from a fixed set (select, checkbox, radio type) or free-form (text). (replaces category item value)
Changed:
<
<

Defining a Form Template

A Form Template is simply a page containing your form, defined in a table where each row is one form field.

>
>

Defining a Form in One Topic

 
  1. Create a new topic with your Form name: MyForm, ExpenseReport, InfoCategory, RecordReview, whatever you need.
  2. Create a TWiki table, with each column representing one element of an entry field: Name, Type, Size, Values, and Tooltip msessage (see sample below).
Line: 68 to 68
  OsSolaris, OsWin | blah blah... |
OsVersion text 16   blah blah...
Deleted:
<
<

Defining a Form in One Topic

Example: WebFormTemplate from the TWiki.Know web
 
Name Type Size Values Tooltip message
TopicClassification select 1 NoDisclosure, PublicSupported, PublicFAQ blah blah...
Line: 81 to 75
 
OsVersion text 16   blah blah...
Changed:
<
<

Defining a Form in Multiple Topics

>
>

Defining a Form with Multiple Topics

  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 - radio, select, checkbox - can be defined by field value Template topics.
>
>
  • A Form Template topic defines the Form.
  • Fields that have more then one value - radio, select, checkbox - can be defined in individual field value topics.
 
Changed:
<
<
Code from:
>
>
Example: WebFormTemplate
 
Changed:
<
<
  • WebFormTemplate of the TWiki.Know web:
>
>
  • Know.WebFormTemplate Form main definition:
     
 
Name Type Size Values Tooltip message
Changed:
<
<
TopicClassification select 1   blah blah...
OperatingSystem checkbox 3   blah blah...
OsVersion text 16   blah blah...
>
>
TopicClassification select 1 ... blah blah...
OperatingSystem checkbox 3 ... blah blah...
OsVersion text 16 ... blah blah...
 
Changed:
<
<
  • TopicClassification topic:
>
>
  • Know.TopicClassification field value definition:
     
 
Name Type Tooltip message
NoDisclosure option blah blah...
PublicSupported option blah blah...
PublicFAQ option blah blah...
Changed:
<
<

Implementation Notes

    • This format allows you to define field items with / without WikiNames, depending on your needs.
>
>
  • Implementation Notes: This format allows you to define field items with or without WikiNames, depending on your needs.
 
    • The topic can be protected in the usual manner so that not everybody can change the form template - see TWikiAccessControl

Line: 131 to 125
 
    • other than checkboxes: name, ex: ?BugPriority=1
    • checkbox: namevalue=1, ex: ?ColourRed=1.
      Boxes with a tick must be specified.
Changed:
<
<

Creating New Topics with Forms

>
>

Including Forms in New Topics

When you create a new topic in a web that has the WEBFORMS Preferences variable set, an Add Form button appears at the bottom of the page. You can start all new topics with forms enabled, and pre-select a form if there's more than one available:

 
Changed:
<
<
When you create a new topic in a web that has the WEBFORMS Preferences variable set, an Add Form button appears at the bottom of the page. If the WebTopicEditTemplate topic has a form added, the form will appear with values set; press Change to remove the template or to switch to a different one.
>
>
  1. Edit the WebTopicEditTemplate topic, adding the name of an available Form.
  2. Create a new topic to check - the Form should appear with values set.
    • Click Change to switch or remove Forms.
  A form embedded in a topic also appears in a new topic. This is done by specifying the formtemplate parameter in the URL.
 
This site is powered by the TWiki collaboration platformCopyright © 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.