- **form** - a topic containing additional meta data (besides the freeform TEXTAREA) that categorizes the content (replaces _category table_)
- Within a form-enabled web, individual topics can have a form or no form
- **form field** - a named item in a form (replaces _category item name_)
-- **field type** - selects the INPUT type:
- - **select** - drop-down menu or scrollable box
- - **checkbox** - one or more checkboxes
- - **checkbox+buttons** - one or more checkboxes, plus **Set** and **Clear** buttons
- - **radio** - one or more radio buttons
- - **text** - a one-line text field
- - **textarea** - a text box; size is 40x10 (columns x rows)
+- **field type** - selects the INPUT type: <table border="1" cellpadding="0" cellspacing="0">
+ <tr>
+ <th bgcolor="#99CCCC"><strong> Input type </strong></th>
+ <th bgcolor="#99CCCC"><strong> Type field </strong></th>
+ <th bgcolor="#99CCCC"><strong> Size field </strong></th>
+ <th bgcolor="#99CCCC"><strong> Value field </strong></th>
+ </tr>
+ <tr>
+ <td> One or more checkboxes </td>
+ <td><code>checkbox</code></td>
+ <td> number of checkboxes per line </td>
+ <td> comma list of checkbox labels </td>
+ </tr>
+ <tr>
+ <td> One or more checkboxes, plus <strong>Set</strong> and <strong>Clear</strong> buttons </td>
+ <td><code>checkbox+buttons</code></td>
+ <td> (same) </td>
+ <td> (same) </td>
+ </tr>
+ <tr>
+ <td> Read-only label text </td>
+ <td><code>label</code></td>
+ <td><code>1</code></td>
+ <td> (unused) </td>
+ </tr>
+ <tr>
+ <td> One or more radio buttons </td>
+ <td><code>radio</code></td>
+ <td> number of radio buttons per line </td>
+ <td> comma list of checkbox labels </td>
+ </tr>
+ <tr>
+ <td> Drop-down menu or scrollable box </td>
+ <td><code>label</code></td>
+ <td><code>1</code> for drop down, <code>2</code> and up for scrollable box </td>
+ <td> comma list of options </td>
+ </tr>
+ <tr>
+ <td> A one-line text field </td>
+ <td><code>text</code></td>
+ <td> text box width in number of characters </td>
+ <td> (unused) </td>
+ </tr>
+ <tr>
+ <td> A text box; size is 40x10 (columns x rows) </td>
+ <td><code>textarea</code></td>
+ <td> columns x rows, e.g. <code>40x6</code></td>
+ <td> (unused) </td>
+ </tr>
+</table>
- **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 in One Topic"></a> Defining a Form in One Topic
%T% **NOTE:** If things aren't working correctly, there may be useful entries in `data/warning.txt`.
--- [[JohnTalintyre]] - 16 Aug 2001 <br /> -- [[MikeMannix]] - 05 Jan 2002
+-- TWiki:Main.JohnTalintyre - 16 Aug 2001 %BR% -- TWiki:Main.MikeMannix - 05 Jan 2002 %BR% -- TWiki:Main.PeterThoeny - 25 Apr 2004
> <td> Current date, e.g. <code>29 Jun 2010</code></td>
> </tr>
> <tr>
+> <td><code>%USERNAME%</code></td>
+> <td> Login name, e.g. <code>jsmith</code></td>
+> </tr>
+> <tr>
+> <td><code>%WIKINAME%</code></td>
+> <td>[[Main/WikiName]] of user, e.g. <code>JohnSmith</code></td>
+> </tr>
+> <tr>
> <td><code>%WIKIUSERNAME%</code></td>
-> <td> User name, e.g. <code>Main.admin</code></td>
+> <td> User name, e.g. <code>Main.JohnSmith</code></td>
> </tr>
> <tr>
> <td><code>%URLPARAM{"name"}%</code></td>
- A drawback of referring to a master template is that you can only test a template from within TWiki, where the include variables are resolved. In the previous system, each template was a structurally complete HTML document with a `.tmpl` filename extension - it contained unresolved `%VARIABLES%`, but could still be previewed directly in a browser.
--- TWiki:Main.PeterThoeny - 30 Dec 2004 %BR% -- TWiki:Main.MikeMannix - 14 Sep 2001 %BR% -- TWiki:Main.DavidLeBlanc - 11 Mar 2002
+-- TWiki:Main.PeterThoeny - 25 Apr 2004 %BR% -- TWiki:Main.MikeMannix - 14 Sep 2001 %BR% -- TWiki:Main.DavidLeBlanc - 11 Mar 2002
TWiki can automatically map an Intranet (Login) Username to a TWiki Username, provided that the username pair exists in the [[TWikiUsers]] topic. This is also handled automatically when you register.
-- %X% In the original TWiki distribution, in <code>**twiki/data**</code>, there are two registration form topics, [[TWikiRegistration]] and [[TWikiRegistrationPub]]. The original form includes an intranet Login Username field. For Basic Authentication, the original form is replaced by the Pub version. If you started using TWiki on Basic Authentication and want to change, you have to switch back forms for future use, and manually correct the existing entries, by editing [[TWikiUsers]], adding the Login Username for each member - `PeterThoeny - pthoeny - 01 Jan 1999` - and also in the <code>**.htpasswd**</code> file, where you can either replace the [[WikiNames]] or duplicate the entries and have both, so both usernames will work. **_verification and clearer rewrite to follow in a bit. also link to original installation mention._**
+- %X% In the original TWiki distribution, in <code>**twiki/data**</code>, there are two registration form topics, [[TWikiRegistration]] and [[TWikiRegistrationPub]]. The original form includes an intranet Login Username field. For Basic Authentication, the original form is replaced by the Pub version. If you started using TWiki on Basic Authentication and want to change, you have to switch back forms for future use, and manually correct the existing entries, by editing [[TWikiUsers]], adding the Login Username for each member - `PeterThoeny - pthoeny - 01 Jan 1999` - and also in the <code>**.htpasswd**</code> file, where you can either replace the [[WikiNames]] or duplicate the entries and have both, so both usernames will work.
> **_NOTE:_**
>
>
--- [[MikeMannix]] - 19 May 2002
+-- [[MikeMannix]] - 19 May 2002 %BR% -- [[PeterThoeny]] - 25 Apr 2004
</td>
</tr>
<tr bgcolor="#ffffff">
- <td valign="top"><strong>Ordered List:</strong> %BR% Three spaces, a number, and another space. </td>
+ <td valign="top"><strong>Ordered List:</strong> %BR% Three spaces, a number, a dot, and another space. Several types are available besides a number: <table border="1" cellpadding="0" cellspacing="0">
+ <tr>
+ <th bgcolor="#99CCCC"><strong> Type </strong></th>
+ <th bgcolor="#99CCCC"><strong> Generated Style </strong></th>
+ <th bgcolor="#99CCCC"><strong> Sample Sequence </strong></th>
+ </tr>
+ <tr>
+ <td> 1. </td>
+ <td> Arabic numerals </td>
+ <td> 1, 2, 3, 4... </td>
+ </tr>
+ <tr>
+ <td> A. </td>
+ <td> Uppercase letters </td>
+ <td> A, B, C, D... </td>
+ </tr>
+ <tr>
+ <td> a. </td>
+ <td> Lowercase letters </td>
+ <td> a, b, c, d... </td>
+ </tr>
+ <tr>
+ <td> I. </td>
+ <td> Uppercase Roman Numerals </td>
+ <td> I, II, III, IV... </td>
+ </tr>
+ <tr>
+ <td> i. </td>
+ <td> Lowercase Roman Numerals </td>
+ <td> i, ii, iii, iv... </td>
+ </tr>
+ </table>
+ <p>
+ </p>
+ </td>
<td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- 1 Sushi
- 1 Dim Sum
+ 1. Sushi
+ 1. Dim Sum
+
+ A. Sushi
+ A. Dim Sum
+
+ i. Sushi
+ i. Dim Sum
</pre> </font></span></td>
<td valign="top">
<ol>
<li> Sushi </li>
<li> Dim Sum </li>
</ol>
+ <p>
+ </p>
+ <ol>
+ <li type="A"> Sushi </li>
+ <li type="A"> Dim Sum </li>
+ </ol>
+ <p>
+ </p>
+ <ol>
+ <li type="i"> Sushi </li>
+ <li type="i"> Dim Sum </li>
+ </ol>
</td>
</tr>
<tr bgcolor="#ffffff">
[[wiki syntax]]
[[Main.TWiki users]]
+
+escaped:
+![[wiki syntax]]
</pre> </font></span></td>
<td valign="top">[[Main/WikiSyntax]]<p>[[Main/TWikiUsers]]</p>
+ <p> escaped: [[wiki syntax]] </p>
</td>
</tr>
<tr bgcolor="#ffffff">
### <a name="TWiki and _JavaScript"></a> TWiki and JavaScript
-You can use JavaScript for your TWiki applications. Sice TWiki rendering might interfere with JavaScript code you need to escape it with HTML comments and `<pre>` tags:
+You can use JavaScript for your TWiki applications. Since TWiki rendering might interfere with JavaScript code you need to escape it with HTML comments and `<pre>` tags:
<script language="JavaScript">
<!-- Hide JavaScript and <pre> escape TWiki rendering
- **Q:** Why is the `'&'` character sometimes not displayed?
- **A:** The `'&'` character has a special meaning in HTML, it starts a so called character entity, i.e. `'©'` is the `©` copyright character. You need to escape `'&'` to see it as it is, so write `'&'` instead of `'&'`. <br /> Example: Type `'This & that'` to get `'This & that'`.
--- TWiki:Main.MikeMannix - 02 Dec 2001 <br /> -- TWiki:Main.PeterThoeny - 29 Mar 2004
+-- TWiki:Main.MikeMannix - 02 Dec 2001 <br /> -- TWiki:Main.PeterThoeny - 25 Apr 2004