summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikeMannix <MikeMannix>2001-09-09 06:51:31 +0000
committerMikeMannix <MikeMannix>2001-09-09 06:51:31 +0000
commiteecf58c5a84001c53550543887cc90e41909588e (patch)
treeb895747818b3d00a274e66023a9e625a867f76ac
parent277f7242f694dfbdad8307f90f65e18d4c9a24e9 (diff)
none
-rw-r--r--TWiki/TWikiForms.mdwn50
1 files changed, 24 insertions, 26 deletions
diff --git a/TWiki/TWikiForms.mdwn b/TWiki/TWikiForms.mdwn
index 8f3817c3..d1c0a32e 100644
--- a/TWiki/TWikiForms.mdwn
+++ b/TWiki/TWikiForms.mdwn
@@ -12,12 +12,10 @@ Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWik
<a name="FormsVsCategoryTables"></a>
-## <a name="Changes_from_the_Category_Table_"> Changes from the Category Table System </a>
+## <a name="Main_Changes_from_Category_Table"> Main Changes from Category Tables </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>
@@ -41,7 +39,7 @@ Main changes from TWikiCategoryTable:
</tr>
</table>
-### <a name="Importing_Existing_Category_Tabl"> Importing Existing Category Table Data </a>
+### <a name="Importing_Category_Table_Data"> Importing 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.
@@ -49,7 +47,11 @@ The new Form Template system should work with old Category Table data with no sp
**_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>
+## <a name="Defining_a_Form_Template"> Defining a Form Template </a>
+
+A Form Template is simply a page containing your form, defined in a table where each row is one form field.
+
+### <a name="Form_Template_Elements"> Form Template Elements </a>
* **form template** - a set of fields defining a form (replaces _category table definition_)
* A web can use one or more form templates.
@@ -65,9 +67,7 @@ The new Form Template system should work with old Category Table data with no sp
* **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_)
-### <a name="Defining_a_Form_Template"> Defining a Form Template </a>
-
-A Form Template is simply a page containing your form, defined in a table where each row is one form field.
+### <a name="Defining_a_Form_in_One_Topic"> Defining a Form in One Topic </a>
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).
@@ -82,10 +82,6 @@ A Form Template is simply a page containing your form, defined in a table where
> | 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 from the TWiki.Know web**
>
> <table border="1" cellpadding="1" cellspacing="0">
> <tr>
@@ -118,16 +114,16 @@ A Form Template is simply a page containing your form, defined in a table where
> </tr>
> </table>
-### <a name="Defining_a_Form_in_Multiple_Topi"> Defining a Form in Multiple Topics </a>
+### <a name="Defining_a_Form_with_Multiple_To"> Defining a Form with Multiple Topics </a>
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 - 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.
-> **Code from:**
+> **Example: WebFormTemplate**
>
-> * WebFormTemplate of the TWiki.Know web: <table border="1" cellpadding="1" cellspacing="0">
+> * Know.WebFormTemplate Form main definition: <br />   <table border="1" cellpadding="1" cellspacing="0">
> <tr>
> <th bgcolor="#99CCCC"><strong>Name</strong></th>
> <th bgcolor="#99CCCC"><strong>Type</strong></th>
@@ -139,26 +135,26 @@ The Form Template can also be defined in an alternative way by using more then o
> <td><span style="background:"><font color="">Topic Classification</font></span><a href="http://LOCATIONKnow/TopicClassification">?</a></td>
> <td> select </td>
> <td> 1 </td>
-> <td>   </td>
+> <td align="center"> ... </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>   </td>
+> <td align="center"> ... </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 align="center"> ... </td>
> <td> blah blah... </td>
> </tr>
> </table>
>
-> * TopicClassification topic: <table border="1" cellpadding="1" cellspacing="0">
+> * Know.TopicClassification field value definition: <br />   <table border="1" cellpadding="1" cellspacing="0">
> <tr>
> <th bgcolor="#99CCCC"><strong>Name</strong></th>
> <th bgcolor="#99CCCC"><strong>Type</strong></th>
@@ -181,9 +177,7 @@ The Form Template can also be defined in an alternative way by using more then o
> </tr>
> </table>
-#### <a name="Implementation_Notes"> Implementation Notes </a>
-
-* * This format allows you to define field items with / without [[TWiki/WikiNames]], depending on your needs.
+* **Implementation Notes:** This format allows you to define field items with or without [[TWiki/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]]
@@ -209,9 +203,13 @@ Forms are enabled on a per web basis. The <code>**WEBFORMS**</code> variable in
* 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>
+## <a name="Including_Forms_in_New_Topics"> Including Forms in New Topics </a>
+
+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:
-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.