summaryrefslogtreecommitdiff
path: root/TWiki
diff options
context:
space:
mode:
authorMikeMannix <MikeMannix>2001-09-07 23:27:02 +0000
committerMikeMannix <MikeMannix>2001-09-07 23:27:02 +0000
commit022fdc14e10dd0eb1f82308ae0192a9446cbf609 (patch)
tree5a4ee4b1c624b63a4faf19bcba16720d82c200dd /TWiki
parenta57f1b9f2c11cb7a317e008fcf21d46a18d2111d (diff)
none
Diffstat (limited to 'TWiki')
-rw-r--r--TWiki/TWikiForms.mdwn151
1 files changed, 96 insertions, 55 deletions
diff --git a/TWiki/TWikiForms.mdwn b/TWiki/TWikiForms.mdwn
index b8eb69a1..8f3817c3 100644
--- a/TWiki/TWikiForms.mdwn
+++ b/TWiki/TWikiForms.mdwn
@@ -1,14 +1,53 @@
%TOC% %STARTINCLUDE%
-# <a name="Form_Templates"> Form Templates </a>
+# <a name="TWiki_Form_Templates"> TWiki Form Templates </a>
-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 &amp; topic_
## <a name="Overview"> Overview </a>
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 [[TWikiDocumentation]]; all data is saved.
-Form Templates replace TWikiCategory Tables from the previous version of TWiki.
+Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.
+
+<a name="FormsVsCategoryTables"></a>
+
+## <a name="Changes_from_the_Category_Table_"> Changes from the Category Table System </a>
+
+Form Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
+
+Main changes from TWikiCategoryTable:
+
+<table border="1" cellpadding="1" cellspacing="0">
+ <tr>
+ <th align="center" bgcolor="#99CCCC"><strong>Form Templates</strong></th>
+ <th align="center" bgcolor="#99CCCC"><strong>Category Tables</strong></th>
+ </tr>
+ <tr>
+ <td align="center"> defined in topics </td>
+ <td align="center"> defined in templates </td>
+ </tr>
+ <tr>
+ <td align="center"> many forms per web </td>
+ <td align="center"> one table per web </td>
+ </tr>
+ <tr>
+ <td align="center"> saved as Meta Data </td>
+ <td align="center"> saved as HTML </td>
+ </tr>
+ <tr>
+ <td align="center"><strong>Change</strong> &amp;amp; <strong>Add Form</strong> buttons </td>
+ <td align="center"><strong><nop>UseCategory</nop></strong> radio button </td>
+ </tr>
+</table>
+
+### <a name="Importing_Existing_Category_Tabl"> Importing Existing Category Table Data </a>
+
+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 <code>**twikicatitems.tmpl**</code>. 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`.
## <a name="Form_Template_Elements"> Form Template Elements </a>
@@ -35,64 +74,66 @@ A Form Template is simply a page containing your form, defined in a table where
3. For each field, fill in a new line; for the type of field, select from the list.
4. Save the topic.
->
+> **Example: WebFormTemplate from the TWiki.Know web**
>
-> | *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* |
+> | Know.TopicClassification | select | 1 | Know.NoDisclosure,
+> Know.PublicSupported, Know.PublicFAQ | blah blah... |
+> | Know.OperatingSystem | checkbox | 3 | Know.OsHPUX, Know.OsLinux,
+> Know.OsSolaris, Know.OsWin | blah blah... |
+> | Know.OsVersion | text | 16 | | blah blah... |
### <a name="Defining_a_Form_in_One_Topic"> Defining a Form in One Topic </a>
-Example: WebFormTemplate of the TWiki.Know web:
-
-<table border="1" cellpadding="1" cellspacing="0">
- <tr>
- <th bgcolor="#99CCCC"><strong>Name:</strong></th>
- <th bgcolor="#99CCCC"><strong>Type:</strong></th>
- <th bgcolor="#99CCCC"><strong>Size:</strong></th>
- <th bgcolor="#99CCCC"><strong>Values:</strong></th>
- <th bgcolor="#99CCCC"><strong>Tooltip message:</strong></th>
- </tr>
- <tr>
- <td><span style="background:"><font color="">Topic Classification</font></span><a href="http://LOCATIONKnow/TopicClassification">?</a></td>
- <td> select </td>
- <td> 1 </td>
- <td><span style="background:"><font color="">No Disclosure</font></span><a href="http://LOCATIONKnow/NoDisclosure">?</a>, <span style="background:"><font color="">Public Supported</font></span><a href="http://LOCATIONKnow/PublicSupported">?</a>, <span style="background:"><font color="">Public FAQ</font></span><a href="http://LOCATIONKnow/PublicFAQ">?</a></td>
- <td> blah blah... </td>
- </tr>
- <tr>
- <td><span style="background:"><font color="">Operating System</font></span><a href="http://LOCATIONKnow/OperatingSystem">?</a></td>
- <td> checkbox </td>
- <td> 3 </td>
- <td><span style="background:"><font color="">Os HPUX</font></span><a href="http://LOCATIONKnow/OsHPUX">?</a>, <span style="background:"><font color="">Os Linux</font></span><a href="http://LOCATIONKnow/OsLinux">?</a>, <span style="background:"><font color="">Os Solaris</font></span><a href="http://LOCATIONKnow/OsSolaris">?</a>, <span style="background:"><font color="">Os Win</font></span><a href="http://LOCATIONKnow/OsWin">?</a></td>
- <td> blah blah... </td>
- </tr>
- <tr>
- <td><span style="background:"><font color="">Os Version</font></span><a href="http://LOCATIONKnow/OsVersion">?</a></td>
- <td> text </td>
- <td> 16 </td>
- <td>   </td>
- <td> blah blah... </td>
- </tr>
-</table>
+> **Example: WebFormTemplate from the TWiki.Know web**
+>
+> <table border="1" cellpadding="1" cellspacing="0">
+> <tr>
+> <th bgcolor="#99CCCC"><strong>Name</strong></th>
+> <th bgcolor="#99CCCC"><strong>Type</strong></th>
+> <th bgcolor="#99CCCC"><strong>Size</strong></th>
+> <th bgcolor="#99CCCC"><strong>Values</strong></th>
+> <th bgcolor="#99CCCC"><strong>Tooltip message</strong></th>
+> </tr>
+> <tr>
+> <td><span style="background:"><font color="">Topic Classification</font></span><a href="http://LOCATIONKnow/TopicClassification">?</a></td>
+> <td> select </td>
+> <td align="center"> 1 </td>
+> <td><span style="background:"><font color="">No Disclosure</font></span><a href="http://LOCATIONKnow/NoDisclosure">?</a>, <span style="background:"><font color="">Public Supported</font></span><a href="http://LOCATIONKnow/PublicSupported">?</a>, <span style="background:"><font color="">Public FAQ</font></span><a href="http://LOCATIONKnow/PublicFAQ">?</a></td>
+> <td> blah blah... </td>
+> </tr>
+> <tr>
+> <td><span style="background:"><font color="">Operating System</font></span><a href="http://LOCATIONKnow/OperatingSystem">?</a></td>
+> <td> checkbox </td>
+> <td align="center"> 3 </td>
+> <td><span style="background:"><font color="">Os HPUX</font></span><a href="http://LOCATIONKnow/OsHPUX">?</a>, <span style="background:"><font color="">Os Linux</font></span><a href="http://LOCATIONKnow/OsLinux">?</a>, <span style="background:"><font color="">Os Solaris</font></span><a href="http://LOCATIONKnow/OsSolaris">?</a>, <span style="background:"><font color="">Os Win</font></span><a href="http://LOCATIONKnow/OsWin">?</a></td>
+> <td> blah blah... </td>
+> </tr>
+> <tr>
+> <td><span style="background:"><font color="">Os Version</font></span><a href="http://LOCATIONKnow/OsVersion">?</a></td>
+> <td> text </td>
+> <td align="center"> 16 </td>
+> <td>   </td>
+> <td> blah blah... </td>
+> </tr>
+> </table>
### <a name="Defining_a_Form_in_Multiple_Topi"> Defining a Form in Multiple Topics </a>
-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:
-* 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.
->
+> **Code from:**
>
> * WebFormTemplate of the TWiki.Know web: <table border="1" cellpadding="1" cellspacing="0">
> <tr>
-> <th bgcolor="#99CCCC"><strong>Name:</strong></th>
-> <th bgcolor="#99CCCC"><strong>Type:</strong></th>
-> <th bgcolor="#99CCCC"><strong>Size:</strong></th>
-> <th bgcolor="#99CCCC"><strong>Values:</strong></th>
-> <th bgcolor="#99CCCC"><strong>Tooltip message:</strong></th>
+> <th bgcolor="#99CCCC"><strong>Name</strong></th>
+> <th bgcolor="#99CCCC"><strong>Type</strong></th>
+> <th bgcolor="#99CCCC"><strong>Size</strong></th>
+> <th bgcolor="#99CCCC"><strong>Values</strong></th>
+> <th bgcolor="#99CCCC"><strong>Tooltip message</strong></th>
> </tr>
> <tr>
> <td><span style="background:"><font color="">Topic Classification</font></span><a href="http://LOCATIONKnow/TopicClassification">?</a></td>
@@ -119,9 +160,9 @@ The form template can also be defined in an alternative way by using more then o
>
> * TopicClassification topic: <table border="1" cellpadding="1" cellspacing="0">
> <tr>
-> <th bgcolor="#99CCCC"><strong>Name:</strong></th>
-> <th bgcolor="#99CCCC"><strong>Type:</strong></th>
-> <th bgcolor="#99CCCC"><strong>Tooltip message:</strong></th>
+> <th bgcolor="#99CCCC"><strong>Name</strong></th>
+> <th bgcolor="#99CCCC"><strong>Type</strong></th>
+> <th bgcolor="#99CCCC"><strong>Tooltip message</strong></th>
> </tr>
> <tr>
> <td><span style="background:"><font color="">No Disclosure</font></span><a href="http://LOCATIONKnow/NoDisclosure">?</a></td>
@@ -164,9 +205,9 @@ Forms are enabled on a per web basis. The <code>**WEBFORMS**</code> variable in
* 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.
-* 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`. <br /> Boxes with a tick must be specified.
## <a name="Creating_New_Topics_with_Forms"> Creating New Topics with Forms </a>