TWiki Forms - Foundation of TWiki ApplicationsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.On this page:
OverviewBy adding form-based input to free form content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. Typical steps to build an application based on TWiki forms:
![]() ![]() Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
Adding a Form to a Topic
Changing a Form
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each row of the table defines one element of an input field:
Name , Type and Size columns are required. Other columns are optional. The form template must have a header row, e.g. at least | *Name* | *Type* | *Size* | is required. Columns:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For example, a simple form just supporting entry of a name and a date would look as follows:
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
Form Field TypesEach table row of a form template defines one element of an input field:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Many types of form fields are available. Some are TWiki internal, some are provided by extensions. Find more TWiki form field extensions![]() Size and Value depend on the Type used. Form field types: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Many types of form fields are available. Some are TWiki internal, some are provided by extensions. Find more TWiki form field extensions![]() Size , Value and Attributes depend on the Type used. Form field types: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
Note on Attributes:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Using a form template on a different webYou can use a form template on a different web by specifying a form template in the WEB.TOPIC format. In addition, you can put a comma separated list of webs in theTWIKIFORMPATH variable.
It's referred to only when a form template is spcified without a web (TOPIC instead of WEB.TOPIC).
The webs in TWIKIFORMPATH are examined in the listed order until the specified template is found.
TWIKIFORMPATH may contain TWiki variables. For example:
* Set TWIKIFORMPATH = %APPLICATION_WEB%, %WEB%If TWIKIFORMPATH is defined, the current web is examined only if all the webs listed in it don't have the form template.
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsEditing Just Form Data, Without Topic TextIn some cases you want to change only the form data. You have the option of hiding the topic text with two methods:
Build an HTML Form to Create New Form-based TopicsNew topics with a form are created by simple HTML forms asking for a topic name. For example, you can have aSubmitExpenseReport topic where you can create new expense reports, a SubmitVacationRequest topic, and so on. These can specify the required template topic with its associated form. Template topics has more.
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Update Specific Form FieldsAll the form fields are shown and can be updated when editing a topic that has a form. It is possible to have more control over the layout of a form, or update just a subset of the form fields by using a custom HTML form. For example, in a bug tracker, each topic would include a header topic that shows a form with some fields to update specific form fields of the bug item. Use the EDITFORMFIELD variable to easily create this form in the header topic. Example:%EDITFORMFIELD{ "form" type="start" action="save" topic="%BASETOPIC%" }% | Priority: | %EDITFORMFIELD{ "Priority" topic="%BASETOPIC%" }% | | Status: | %EDITFORMFIELD{ "Status" topic="%BASETOPIC%" }% | | | %EDITFORMFIELD{ "form" type="submit" value="Update" }% | %EDITFORMFIELD{ "LastUpdate" type="hidden" value="%SERVERTIME{$year-$mo-$day}%" }% %EDITFORMFIELD{ "form" type="end" }%Assuming the base topic has a BugForm with Priority and Status fields of type select, a LastUpdate field of type text, and some other fields. Above form shows a table with selectors for Priority and Status, and an Update button. On form submit, the Priority, Status and LastUpdate fields are updated in the base topic. Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData, EDITFORMFIELD, FORMFIELD, SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.ExampleSearching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin ![]() Gotcha!
|
TWiki Forms - Foundation of TWiki ApplicationsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.On this page:
OverviewBy adding form-based input to free form content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. Typical steps to build an application based on TWiki forms:
![]() ![]() Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
Adding a Form to a Topic
Changing a Form
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each row of the table defines one element of an input field:
Name , Type and Size columns are required. Other columns are optional. The form template must have a header row, e.g. at least | *Name* | *Type* | *Size* | is required. Columns:
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
Form Field TypesEach table row of a form template defines one element of an input field:
![]() Size and Value depend on the Type used. Form field types:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Using a form template on a different webYou can use a form template on a different web by specifying a form template in the WEB.TOPIC format. In addition, you can put a comma separated list of webs in theTWIKIFORMPATH variable.
It's referred to only when a form template is spcified without a web (TOPIC instead of WEB.TOPIC).
The webs in TWIKIFORMPATH are examined in the listed order until the specified template is found.
TWIKIFORMPATH may contain TWiki variables. For example:
* Set TWIKIFORMPATH = %APPLICATION_WEB%, %WEB%If TWIKIFORMPATH is defined, the current web is examined only if all the webs listed in it don't have the form template.
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsEditing Just Form Data, Without Topic TextIn some cases you want to change only the form data. You have the option of hiding the topic text with two methods:
Build an HTML Form to Create New Form-based TopicsNew topics with a form are created by simple HTML forms asking for a topic name. For example, you can have aSubmitExpenseReport topic where you can create new expense reports, a SubmitVacationRequest topic, and so on. These can specify the required template topic with its associated form. Template topics has more.
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Update Specific Form FieldsAll the form fields are shown and can be updated when editing a topic that has a form. It is possible to have more control over the layout of a form, or update just a subset of the form fields by using a custom HTML form. For example, in a bug tracker, each topic would include a header topic that shows a form with some fields to update specific form fields of the bug item. Use the EDITFORMFIELD variable to easily create this form in the header topic. Example:%EDITFORMFIELD{ "form" type="start" action="save" topic="%BASETOPIC%" }% | Priority: | %EDITFORMFIELD{ "Priority" topic="%BASETOPIC%" }% | | Status: | %EDITFORMFIELD{ "Status" topic="%BASETOPIC%" }% | | | %EDITFORMFIELD{ "form" type="submit" value="Update" }% | %EDITFORMFIELD{ "LastUpdate" type="hidden" value="%SERVERTIME{$year-$mo-$day}%" }% %EDITFORMFIELD{ "form" type="end" }%Assuming the base topic has a BugForm with Priority and Status fields of type select, a LastUpdate field of type text, and some other fields. Above form shows a table with selectors for Priority and Status, and an Update button. On form submit, the Priority, Status and LastUpdate fields are updated in the base topic. Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData, EDITFORMFIELD, FORMFIELD, SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.ExampleSearching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin ![]() Gotcha!
|
TWiki Forms - Foundation of TWiki ApplicationsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.On this page:
OverviewBy adding form-based input to free form content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. Typical steps to build an application based on TWiki forms:
![]() ![]() Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Enabling Forms by Web | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Adding a Form to a Topic | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Forms have to be enabled for each individual web. The WEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Adding a form to a topic
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
<form name="newtopic" action="%SCRIPTURLPATH{"save"}%/%WEB%/" method="post"> ..... </form> | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Changing a form | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Changing a Form | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each row of the table defines one element of an input field:
Name , Type and Size columns are required. Other columns are optional. The form template must have a header row, e.g. at least | *Name* | *Type* | *Size* | is required. Columns:
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
Form Field TypesEach table row of a form template defines one element of an input field:
![]() Size and Value depend on the Type used. Form field types:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Using a form template on a different webYou can use a form template on a different web by specifying a form template in the WEB.TOPIC format. In addition, you can put a comma separated list of webs in theTWIKIFORMPATH variable.
It's referred to only when a form template is spcified without a web (TOPIC instead of WEB.TOPIC).
The webs in TWIKIFORMPATH are examined in the listed order until the specified template is found.
TWIKIFORMPATH may contain TWiki variables. For example:
* Set TWIKIFORMPATH = %APPLICATION_WEB%, %WEB%If TWIKIFORMPATH is defined, the current web is examined only if all the webs listed in it don't have the form template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsEditing Just Form Data, Without Topic TextIn some cases you want to change only the form data. You have the option of hiding the topic text with two methods:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Build an HTML Form to Create New Form-based TopicsNew topics with a form are created by simple HTML forms asking for a topic name. For example, you can have aSubmitExpenseReport topic where you can create new expense reports, a SubmitVacationRequest topic, and so on. These can specify the required template topic with its associated form. Template topics has more.
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
Update Specific Form FieldsAll the form fields are shown and can be updated when editing a topic that has a form. It is possible to have more control over the layout of a form, or update just a subset of the form fields by using a custom HTML form. For example, in a bug tracker, each topic would include a header topic that shows a form with some fields to update specific form fields of the bug item. Use the EDITFORMFIELD variable to easily create this form in the header topic. Example:%EDITFORMFIELD{ "form" type="start" action="save" topic="%BASETOPIC%" }% | Priority: | %EDITFORMFIELD{ "Priority" topic="%BASETOPIC%" }% | | Status: | %EDITFORMFIELD{ "Status" topic="%BASETOPIC%" }% | | | %EDITFORMFIELD{ "form" type="submit" value="Update" }% | %EDITFORMFIELD{ "LastUpdate" type="hidden" value="%SERVERTIME{$year-$mo-$day}%" }% %EDITFORMFIELD{ "form" type="end" }%Assuming the base topic has a BugForm with Priority and Status fields of type select, a LastUpdate field of type text, and some other fields. Above form shows a table with selectors for Priority and Status, and an Update button. On form submit, the Priority, Status and LastUpdate fields are updated in the base topic. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Searching for Form Data | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData, FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | TWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData, EDITFORMFIELD, FORMFIELD, SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Example | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | %SEARCH{"Main.UserName" scope="text" nosearch="on" nototal="on" order="modified" reverse="on" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | %SEARCH{"Main.UserName" scope="text" nosearch="on" nototal="on" sort="modified" reverse="on" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
format="|$topic |$formfield(TopicClassification) |" web="Sandbox"}%
Searching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin![]() Gotcha!
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki Forms - Foundation of TWiki ApplicationsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.On this page:
OverviewBy adding form-based input to free form content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. Typical steps to build an application based on TWiki forms:
![]() ![]() Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example:
Adding a form to a topic
Changing a form
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Each column of the table is one element of an entry field: Name , Type , Size , Values , Tooltip message , and Attributes . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Each row of the table defines one element of an input field: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | The Name , Type and Size columns are required. Other columns are optional. The form must have a header row (e.g. | *Name* | *Type* | *Size* | ). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Name column: Name is the name of the form field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The Name , Type and Size columns are required. Other columns are optional. The form template must have a header row, e.g. at least | *Name* | *Type* | *Size* | is required. Columns: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Type, Size, Value columns: Type , Size and Value describe the type, size and initial value for this field: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Tooltip message column: The Tooltip message will be displayed when the cursor is hovered over the field in edit view. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Attributes column: Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For example, a simple form just supporting entry of a name and a date would look as follows:
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
Form Field TypesEach table row of a form template defines one element of an input field:
![]() Size and Value depend on the Type used. Form field types:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsEditing Just Form Data, Without Topic TextIn some cases you want to change only the form data. You have the option of hiding the topic text with two methods:
Build an HTML Form to Create New Form-based TopicsNew topics with a form are created by simple HTML forms asking for a topic name. For example, you can have aSubmitExpenseReport topic where you can create new expense reports, a SubmitVacationRequest topic, and so on. These can specify the required template topic with its associated form. Template topics has more.
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
ExampleSearching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin ![]() Gotcha!
|
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki Forms | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | TWiki Forms - Foundation of TWiki Applications | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.
On this page:
Overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | By adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | By adding form-based input to free form content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Typical steps to build an application based on TWiki forms:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example:
Adding a form to a topic
Changing a form
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each column of the table is one element of an entry field:Name , Type , Size , Values , Tooltip message , and Attributes .
The Name , Type and Size columns are required. Other columns are optional. The form must have a header row (e.g. | *Name* | *Type* | *Size* | ).
Name column: Name is the name of the form field.
Type, Size, Value columns: Type , Size and Value describe the type, size and initial value for this field:
Tooltip message will be displayed when the cursor is hovered over the field in edit view.
Attributes column: Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsEditing Just Form Data, Without Topic TextIn some cases you want to change only the form data. You have the option of hiding the topic text with two methods:
Build an HTML Form to Create New Form-based TopicsNew topics with a form are created by simple HTML forms asking for a topic name. For example, you can have aSubmitExpenseReport topic where you can create new expense reports, a SubmitVacationRequest topic, and so on. These can specify the required template topic with its associated form. Template topics has more.
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
ExampleSearching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin ![]() Gotcha!
|
TWiki FormsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.On this page:
OverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. Typical steps to build an application based on TWiki forms: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Defining a Form | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example:
Adding a form to a topic
Changing a form | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each column of the table is one element of an entry field:Name , Type , Size , Values , Tooltip message , and Attributes .
The Name , Type and Size columns are required. Other columns are optional. The form must have a header row (e.g. | *Name* | *Type* | *Size* | ). | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Name is the name of the form field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Name column: Name is the name of the form field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | The Type , Size and Value fields describe the legal values for this field, and how to display them. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Type, Size, Value columns: Type , Size and Value describe the type, size and initial value for this field: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Tooltip message is a message that will be displayed when the cursor is hovered over the field in edit view. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Tooltip message column: The Tooltip message will be displayed when the cursor is hovered over the field in edit view. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
Attributes column: Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 | | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Field Name Notes: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Field Value Notes: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
General Notes: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Values in Other Topics | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
As described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:
| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Extending the range of form data types | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
You can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and Tips | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Build an HTML form to create new Form-based topics
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
Editing Just Form Data, Without Topic Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
In some cases you want to change only the form data. You have the option of hiding the topic text with two methods:
Build an HTML Form to Create New Form-based TopicsNew topics with a form are created by simple HTML forms asking for a topic name. For example, you can have aSubmitExpenseReport topic where you can create new expense reports, a SubmitVacationRequest topic, and so on. These can specify the required template topic with its associated form. Template topics has more. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Searching for Form Data | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData, FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
ExampleSearching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin ![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Gotcha! | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Related Topics: TWikiTemplates, TWikiScripts, UserDocumentationCategory | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Related Topics: TWikiTemplates, TWikiScripts, VarSEARCH, FormattedSearch, UserDocumentationCategory | ||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki FormsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.On this page:
OverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. Typical steps to build an application based on TWiki forms:
Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example:Field values can also be set using the result of expanding other TWiki variables. For example,
When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values.
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example:
Adding a form to a topic
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changing a form
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each column of the table is one element of an entry field:Name , Type , Size , Values , Tooltip message , and Attributes .
The Name , Type and Size columns are required. Other columns are optional. The form must have a header row (e.g. | *Name* | *Type* | *Size* | ).
Name is the name of the form field.
The Type , Size and Value fields describe the legal values for this field, and how to display them.
Tooltip message is a message that will be displayed when the cursor is hovered over the field in edit view.
Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces.
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsBuild an HTML form to create new Form-based topics
Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
ExampleSearching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin ![]() Gotcha!
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Related Topics: UserDocumentationCategory, TWikiTemplates | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Related Topics: TWikiTemplates, TWikiScripts, UserDocumentationCategory | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki Forms | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | TWiki Forms | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Add structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | By adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have only form attached to it at a time. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | By adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have one form attached to it at a time. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Typical steps to build an application based on TWiki forms:
Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field.
Example:See structure of a form for full details of what types are available and what all the columns mean. You can also retrieve possible values for select , checkbox or radio types from other topics:
Example: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Field values can also be obtained as the result of a FormattedSearch. For example, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Field values can also be set using the result of expanding other TWiki variables. For example, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | %SEARCH{"Office$" scope="topic" web="%MAINWEB%" nonoise="on" type="regex" format="$web.$topic" separator=", " }% | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | %SEARCH{"Office$" scope="topic" web="%USERSWEB%" nonoise="on" type="regex" format="$web.$topic" separator=", " }% | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | when used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | When used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example:
Adding a form to a topic
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Changing a form
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each column of the table is one element of an entry field:Name , Type , Size , Values , Tooltip message , and Attributes .
The Name , Type and Size columns are required. Other columns are optional. The form must have a header row (e.g. | *Name* | *Type* | *Size* | ).
Name is the name of the form field.
The Type , Size and Value fields describe the legal values for this field, and how to display them.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Tooltip message is a message that will be displayed when the cursor is hovered over the field in edit view.
Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces.
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
General Notes:
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsBuild an HTML form to create new Form-based topics
Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
Example | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | %SEARCH{"Main.UserName" scope="text" nosearch="on" nototal="on" order="modified" reverse="on" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | %SEARCH{"Main.UserName" scope="text" nosearch="on" nototal="on" order="modified" reverse="on" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
format="|$topic |$formfield(TopicClassification) |" web="Sandbox"}%
Searching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin![]() Gotcha!
|
On this page:
TWiki FormsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.OverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have only form attached to it at a time. Typical steps to build an application based on TWiki forms:
| |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | Defining a Form Template | ||||||||||||||||||||||||||||||||
> > | Defining a FormA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. | ||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||
< < | A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table is one form field.
Form Template Elements
Defining a Form | ||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | Example: WebForm | ||||||||||||||||||||||||||||||||
> > | Example: | ||||||||||||||||||||||||||||||||
| *Name* | *Type* | *Size* | *Values* | *Tooltip message* | *Attributes* | | TopicClassification | select | 1 | NoDisclosure, PublicSupported, PublicFAQ | blah blah... | | | OperatingSystem | checkbox | 3 | OsHPUX, OsLinux, OsSolaris, OsWin | blah blah... | | | OsVersion | text | 16 | | blah blah... | |
| |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | You can also retrieve possible values for select, checkbox or radio types from other topics: | ||||||||||||||||||||||||||||||||
> > | See structure of a form for full details of what types are available and what all the columns mean. | ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||
> > | You can also retrieve possible values for select , checkbox or radio types from other topics: | ||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||
< < | Example: WebForm | ||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||
> > | Example: | ||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > | | *Name* | | NoDisclosure | | Public Supported | | Public FAQ | | ||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Field values can also be obtained as the result of a FormattedSearch. For example, | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | when used in the value field of the form definition, will take the set of field values to be all topic names in the Main web which end in "Office". | ||||||||||||||||||||||||||||||||
> > | when used in the value field of the form definition, this will find all topic names in the Main web which end in "Office" and use them as the legal field values. | ||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||
< < |
Notes:
| ||||||||||||||||||||||||||||||||
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||
Example:
| |||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | Add a form to a topic | ||||||||||||||||||||||||||||||||
> > | Adding a form to a topic | ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||
< < | Build an HTML form to create new Form-based topics
| ||||||||||||||||||||||||||||||||
Changing a form
| |||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||
> > |
Structure of a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table specifies one form field. Each column of the table is one element of an entry field:Name , Type , Size , Values , Tooltip message , and Attributes .
The Name , Type and Size columns are required. Other columns are optional. The form must have a header row (e.g. | *Name* | *Type* | *Size* | ).
Name is the name of the form field.
The Type , Size and Value fields describe the legal values for this field, and how to display them.
Tooltip message is a message that will be displayed when the cursor is hovered over the field in edit view.
Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces.
| *Name* | *Type* | *Size* | | Name | text | 80 | | Date | date | 30 |Field Name Notes:
Values in Other TopicsAs described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:| *Name* | *Type* | *Size* | | AeroplaneManufacturers | select | |the TWiki will look for the topic AeroplaneManufacturers to get the possible values for the select .
The AeroplaneManufacturers topic must contain a table, where each row of the table describes a possible value. The table only requires one column, Name . Other columns may be present, but are ignored.
For example:
| *Name* | | Routan | | Focke-Wulf | | De Havilland |Notes:
Extending the range of form data typesYou can extend the range of data types accepted by forms by using TWikiPlugins. All such extended data types are single-valued (can only have one value) with the following exceptions:
Hints and TipsBuild an HTML form to create new Form-based topics
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | Searching for Form Data | ||||||||||||||||||||||||||||||||
> > | Searching for Form Data | ||||||||||||||||||||||||||||||||
TWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData, FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
Example | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | %SEARCH{"Main.UserName" scope="text" regex="off" nosearch="on" nototal="on" order="modified" reverse="on" | ||||||||||||||||||||||||||||||||
> > | %SEARCH{"Main.UserName" scope="text" nosearch="on" nototal="on" order="modified" reverse="on" | ||||||||||||||||||||||||||||||||
format="|$topic |$formfield(TopicClassification) |" web="Sandbox"}% | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < | Extending the range of form data typesSeveral Plugins allow you to extend the range of data types accepted by forms. For example, the TWiki:Plugins.DateFieldPlugin![]() | ||||||||||||||||||||||||||||||||
> > | Searching forms this way is obviously pretty inefficient, but it's easy to do. If you want better performance, take a look at some of the structured wiki extensions that support higher performance searching e.g. TWiki:Plugins.DBCachePlugin![]() Gotcha! | ||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||
< < |
Gotcha! | ||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||
< < |
Importing Category Table DataVery, very old TWiki releases used a system called the "TWikiCategoryTable". Later releases support automatic import of this 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt . | ||||||||||||||||||||||||||||||||
Related Topics: UserDocumentationCategory, TWikiTemplates |
On this page:
TWiki FormsAdd structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications.OverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have only form attached to it at a time. Typical steps to build an application based on TWiki forms: | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Defining a Form TemplateA Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table is one form field.Form Template Elements | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Defining a Form | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Example: WebFormYou can also retrieve possible values for select, checkbox or radio types from other topics: Example: WebForm | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Field values can also be obtained as the result of a FormattedSearch. For example,
when used in the value field of the form definition, will take the set of field values to be all topic names in the Main web which end in "Office".
Notes: | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Enabling Forms by WebForms have to be enabled for each individual web. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example: | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Add a form to a topic | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Build an HTML form to create new Form-based topics | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changing a form | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search.
Example Extending the range of form data typesSeveral Plugins allow you to extend the range of data types accepted by forms. For example, the TWiki:Plugins.DateFieldPlugin![]() | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Types with names like this can both take multiple values.
Gotcha! | |||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||
Importing Category Table DataVery, very old TWiki releases used a system called the "TWikiCategoryTable". Later releases support automatic import of this 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt .
Related Topics: UserDocumentationCategory, TWikiTemplates |
Deleted: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
On this page:
TWiki Forms | |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Form-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topic | ||||||||||||||||||||||||
> > | Add structure to content with forms attached to twiki topics. TWiki forms (with form fields) and formatted search are the base for building database applications. | ||||||||||||||||||||||||
Overview | |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | By adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. | ||||||||||||||||||||||||
> > | By adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. A form is enabled for a web and can be added to a topic. The form data is shown in tabular format when the topic is viewed, and can be changed in edit mode using edit fields, radio buttons, check boxes and list boxes. Many different form types can be defined in a web, though a topic can only have only form attached to it at a time. | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTables | ||||||||||||||||||||||||
> > | Typical steps to build an application based on TWiki forms: | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Defining a Form Template | |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | A Form Template is simply a page containing your form, defined as a table where each row is one form field. | ||||||||||||||||||||||||
> > | A Form Template specifies the fields in a form. A Form Template is simply a page containing a TWiki table, where each row of the table is one form field. | ||||||||||||||||||||||||
Form Template Elements | |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Defining a Form in One Topic | ||||||||||||||||||||||||
> > | Defining a Form | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Example: WebForm | *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... | | ||||||||||||||||||||||||
> > | Example: WebForm | *Name* | *Type* | *Size* | *Values* | *Tooltip message* | *Attributes* | | TopicClassification | select | 1 | NoDisclosure, PublicSupported, PublicFAQ | blah blah... | | | OperatingSystem | checkbox | 3 | OsHPUX, OsLinux, OsSolaris, OsWin | blah blah... | | | OsVersion | text | 16 | | blah blah... | | | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Defining a Form with Multiple Topics | ||||||||||||||||||||||||
> > | You can also retrieve possible values for select, checkbox or radio types from other topics: | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | Forms can also be defined by using form templates that retrieve field values from one or more separate topics:
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Example: WebFormTemplate | ||||||||||||||||||||||||
> > | Example: WebForm | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
![]() Values field blank. | |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > | Field values can also be obtained as the result of a FormattedSearch. For example, | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
when used in the value field of the form definition, will take the set of field values to be all topic names in the Main web which end in "Office".
Notes:
| ||||||||||||||||||||||||
Enabling Forms by Web | |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Forms are enabled on a per web basis. The WEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
| ||||||||||||||||||||||||
> > | Forms have to be enabled for each individual web. The WEBFORMS variable in WebPreferences is optional and defines a list of possible form templates.
Example: | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Including Forms in New Topics | ||||||||||||||||||||||||
> > | Add a form to a topic | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Setting Up Multiple Form Options | ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > | Build an HTML form to create new Form-based topics | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Form Data Storage | ||||||||||||||||||||||||
> > | Changing a form | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | The form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template. | ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options. | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | Main Changes from Category Tables | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | The Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
| ||||||||||||||||||||||||
> > |
Searching for Form DataTWiki Forms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,FORMFIELD , SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search. | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Importing Category Table Data | ||||||||||||||||||||||||
> > | |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | Example TWiki users often want to have an overview of topics they contributed to. With the $formfield parameter it is easy to display the value of a classification field next to the topic link:
| *Topic* | *Classification* | %SEARCH{"%MAINWEB%.UserName" scope="text" regex="off" nosearch="on" nototal="on" order="modified" reverse="on" format="|<b>[[$web.$topic][$topic]]</b> |<nop>$formfield(TopicClassification) |" web="Sandbox"}% | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | 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 WEBFORMS . If missing, pages will display, but attempting to edit results in an error message. | ||||||||||||||||||||||||
> > | Extending the range of form data types | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | Several Plugins allow you to extend the range of data types accepted by forms. For example, the TWiki:Plugins.DateFieldPlugin![]()
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | 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. | ||||||||||||||||||||||||
> > | Gotcha! | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | ![]() data/warning.txt . | ||||||||||||||||||||||||
> > | |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | Importing Category Table Data | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Using Forms For Settings | ||||||||||||||||||||||||
> > | Very, very old TWiki releases used a system called the "TWikiCategoryTable". Later releases support automatic import of this data. | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | Example process to change your WebPreferences to use forms instead of {3 spaces}* Set statements: | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > | 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 WEBFORMS . If missing, pages will display, but attempting to edit results in an error message. | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Notes: | ||||||||||||||||||||||||
> > | 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. | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | If it isn't working, double check that the S attribute has been specified (S for Setting). | ||||||||||||||||||||||||
> > | ![]() data/warning.txt . | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | If you change the form, the changes will not take affect until you edit and save the preferences' topics again. | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | Using the TWiki:Plugins.EditTablePlugin![]() %EDITTABLE{ header="|*Name*|*Type*|*Size*|*Values*|*Tooltip message*|*Attributes*|" format="|text,20|text,20|text,20|text,20|text,20|text,1|" }%
Result (after some editing):
<-- /editTable -->-- TWiki:Main.JohnTalintyre ![]() -- TWiki:Main.MikeMannix ![]() -- TWiki:Main.PeterThoeny ![]() -- TWiki:Main.MattWilkie ![]() | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > | Related Topics: UserDocumentationCategory, TWikiTemplates | ||||||||||||||||||||||||
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTablesDefining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defining a Form in One Topic
Example: Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
Including Forms in New Topics
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options.
Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt .
Using Forms For SettingsExample process to change your WebPreferences to use forms instead of{3 spaces}* Set statements:
S attribute has been specified (S for Setting).
If you change the form, the changes will not take affect until you edit and save the preferences' topics again.
Using the TWiki:Plugins.EditTablePlugin![]() %EDITTABLE{ header="|*Name*|*Type*|*Size*|*Values*|*Tooltip message*|*Attributes*|" format="|text,20|text,20|text,20|text,20|text,20|text,1|" }%
Result (after some editing):
<-- /editTable -->-- TWiki:Main.JohnTalintyre ![]() -- TWiki:Main.MikeMannix ![]() -- TWiki:Main.PeterThoeny ![]() -- TWiki:Main.MattWilkie ![]()
|
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTablesDefining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
| |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < | Example: WebForm
| *Name* | *Type* | *Size* | *Values* | *Tooltip message* | | Know.TopicClassification | select | 1 | Know.NoDisclosure, Know.PublicSupported, Know.PublicFAQ | blah blah... | | ||||||||||||||||||||||||||||||||||
> > | Example: WebForm | *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... | | ||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||
< < | | OperatingSystem | checkbox | 3 | OsHPUX, OsLinux,
OsSolaris, OsWin | blah blah... |
| ||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||
Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate | |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||
![]() Values field blank. | |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
Including Forms in New Topics
| |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||
Boxes with a tick must be specified.
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options.
Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt . | |||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||
> > | Using Forms For SettingsExample process to change your WebPreferences to use forms instead of{3 spaces}* Set statements:
S attribute has been specified (S for Setting).
If you change the form, the changes will not take affect until you edit and save the preferences' topics again.
Using the TWiki:Plugins.EditTablePlugin![]() %EDITTABLE{ header="|*Name*|*Type*|*Size*|*Values*|*Tooltip message*|*Attributes*|" format="|text,20|text,20|text,20|text,20|text,20|text,1|" }%
Result (after some editing):
<-- /editTable --> | ||||||||||||||||||||||||||||||||||
-- TWiki:Main.JohnTalintyre![]() -- TWiki:Main.MikeMannix ![]() | |||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||
< < | -- TWiki:Main.PeterThoeny![]() | ||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main.PeterThoeny![]() | ||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main.MattWilkie![]() | ||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTablesDefining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
Including Forms in New Topics
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options.
Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt .
-- JohnTalintyre - 16 Aug 2001 -- MikeMannix - 05 Jan 2002 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTablesDefining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
Including Forms in New Topics
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options.
Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt .
-- TWiki:Main.JohnTalintyre![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- TWiki:Main.MikeMannix![]() -- TWiki:Main.PeterThoeny ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template 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 TWikiCategoryTables from the 01-Dec-2000 version of TWiki. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTables | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt . | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Defining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
Including Forms in New Topics
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt . | ||||||||||||||||||||||||||||||||||||||||||||||||||||
-- JohnTalintyre - 16 Aug 2001 -- MikeMannix - 05 Jan 2002
|
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki.Main Changes from Category TablesThe Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt .
Defining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Including Forms in New Topics | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
Including Forms in New TopicsWhen you create a new topic in a web that has theWEBFORMS 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:
formtemplate parameter in the URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options.
-- JohnTalintyre - 16 Aug 2001 -- MikeMannix - 05 Jan 2002
|
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topicOverviewBy adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template if more than one is defined, or remove forms entirely. Form input values are stored as TWikiMetaData; all data is saved. Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki.Main Changes from Category Tables | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Form Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The Form Template system is a more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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.
![]() data/warning.txt .
Defining a Form TemplateA Form Template is simply a page containing your form, defined as a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: Defining a Form with Multiple TopicsForms can also be defined by using form templates that retrieve field values from one or more separate topics:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
Including Forms in New TopicsWhen you create a new topic in a web that has theWEBFORMS 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:
formtemplate parameter in the URL.
Setting Up Multiple Form Options
Form Data StorageThe form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template.Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options.
-- JohnTalintyre - 16 Aug 2001 -- MikeMannix - 05 Jan 2002
|
On this page:
TWiki Forms | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Form-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topic | ||||||||||||||||||||
> > | Form-based input in topics, with name/value pairs stored as Meta Data variables; choose one of multiple forms per web & topic | ||||||||||||||||||||
Overview | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | 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. | ||||||||||||||||||||
> > | By adding form-based input to freeform content, you can structure topics with unlimited, easily searchable categories. When forms are enabled for a web and selected in a topic, a single form appears in edit mode, and the contents are rendered as a table when viewed on the display page. You can define unlimited forms per web. For each topic, you can select a template 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 01-Dec-2000 version of TWiki. | ||||||||||||||||||||
> > | Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. | ||||||||||||||||||||
Main Changes from Category TablesForm Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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. | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | NOTE: If things aren't working correctly, there may be useful entries in data/warning.txt . | ||||||||||||||||||||
> > | ![]() data/warning.txt . | ||||||||||||||||||||
Defining a Form Template | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | A Form Template is simply a page containing your form, defined in a table where each row is one form field. | ||||||||||||||||||||
> > | A Form Template is simply a page containing your form, defined as a table where each row is one form field. | ||||||||||||||||||||
Form Template Elements
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Defining a Form in One Topic | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Example: WebForm from the TWiki.Know web | ||||||||||||||||||||
> > | Example: WebForm | ||||||||||||||||||||
| *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... |
Defining a Form with Multiple Topics | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | The Form Template can also be defined in an alternative way by using more then one topic: | ||||||||||||||||||||
> > | Forms can also be defined by using form templates that retrieve field values from one or more separate topics: | ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Example: WebFormTemplate | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | ![]() Values field blank. | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | | ||||||||||||||||||||
> > | | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
| |||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | |||||||||||||||||||||
Enabling Forms by Web | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Forms are enabled on a per web basis. The WEBFORMS variable in WebPreferences is optional and defines a list of possible Form Templates. Example: | ||||||||||||||||||||
> > | Forms are enabled on a per web basis. The WEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example: | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | Boxes with a tick must be specified. | ||||||||||||||||||||
Including Forms in New Topics | |||||||||||||||||||||
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. 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. You can start all new topics with forms enabled, and pre-select a form if there's more than one available: | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | A form embedded in a topic also appears in a new topic. This is done by specifying the formtemplate parameter in the URL. | ||||||||||||||||||||
> > | A form embedded in a topic also appears in a new topic. This is done by specifying the formtemplate parameter in the URL. | ||||||||||||||||||||
Setting Up Multiple Form Options | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Form Template Data Storage | ||||||||||||||||||||
> > | Form Data Storage | ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | The Form Template topic name, fields and values are stored as TWikiMetaData. The order of field/value pairs in the Meta Data is the same as in the Template. | ||||||||||||||||||||
> > | The form topic name, fields and values are stored as TWikiMetaData - the order of the field/value pairs is the same as in the template. | ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > |
Using Form DataTWikiForms accept user-input data, stored as TWikiMetaData. Meta data also contains program-generated info about changes, attachments, etc. To find, format and display form and other meta data, see TWikiMetaData,SEARCH and METASEARCH variables in TWikiVariables, and TWiki Formatted Search for various options. | ||||||||||||||||||||
-- JohnTalintyre - 16 Aug 2001 | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | -- MikeMannix - 03 Dec 2001 | ||||||||||||||||||||
> > | -- MikeMannix - 05 Jan 2002 | ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | |||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topicOverviewBy 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. Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.Main Changes from Category TablesForm Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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 .
Defining a Form TemplateA Form Template is simply a page containing your form, defined in a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: WebForm from the TWiki.Know web| *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... | Defining a Form with Multiple TopicsThe Form Template can also be defined in an alternative way by using more then one topic:
Example: WebFormTemplate
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible Form Templates. Example:
Including Forms in New TopicsWhen 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:
formtemplate parameter in the URL.
Setting Up Multiple Form Options
Form Template Data StorageThe Form Template topic name, fields and values are stored as TWikiMetaData. The order of field/value pairs in the Meta Data is the same as in the Template. -- JohnTalintyre - 16 Aug 2001 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- MikeMannix - 15 Sep 2001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- MikeMannix - 03 Dec 2001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topicOverviewBy 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. Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.Main Changes from Category TablesForm Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.tmpl . The replacement Form Template must be set as the first item in the WebPreferences variable WEBFORMS . 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 .
Defining a Form TemplateA Form Template is simply a page containing your form, defined in a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: WebForm from the TWiki.Know web| *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... | Defining a Form with Multiple TopicsThe Form Template can also be defined in an alternative way by using more then one topic:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible Form Templates. Example:
Including Forms in New TopicsWhen 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:
formtemplate parameter in the URL.
Setting Up Multiple Form Options
Form Template Data StorageThe Form Template topic name, fields and values are stored as TWikiMetaData. The order of field/value pairs in the Meta Data is the same as in the Template. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- JohnTalintyre - 16 Aug 2001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- JohnTalintyre - 16 Aug 2001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- MikeMannix - 15 Sep 2001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Warning: Can't find topic TWiki.UtilTempDocNote | ||||||||||||||||||||||||||||||||||||||||||||||||||||
On this page:
TWiki FormsForm-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topicOverview | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.
Main Changes from Category TablesForm Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table Data | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | 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 WEBFORMS . 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 .
Defining a Form TemplateA Form Template is simply a page containing your form, defined in a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Example: WebFormTemplate from the TWiki.Know web | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Example: WebForm from the TWiki.Know web | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| *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... |
Defining a Form with Multiple TopicsThe Form Template can also be defined in an alternative way by using more then one topic:
Example: WebFormTemplate
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible Form Templates. Example:
Including Forms in New TopicsWhen 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:
formtemplate parameter in the URL.
Setting Up Multiple Form Options
Form Template Data Storage | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | The Form Template topic name, fields and values are stored as Meta Data. The order of field/value pairs in the Meta Data is the same as in the Template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The Form Template topic name, fields and values are stored as TWikiMetaData. The order of field/value pairs in the Meta Data is the same as in the Template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
-- JohnTalintyre - 16 Aug 2001
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Warning: Can't find topic TWiki.UtilTempDocNote | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki Form Templates | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | TWiki Forms | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Form-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topic
OverviewBy 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. Form Templates replace TWikiCategory Tables from the 01-Dec-2000 version of TWiki.Main Changes from Category TablesForm Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly.
Importing Category Table DataOn 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 oldtwikicatitems.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 .
Defining a Form TemplateA Form Template is simply a page containing your form, defined in a table where each row is one form field.Form Template Elements
Defining a Form in One Topic
Example: WebFormTemplate from the TWiki.Know web| *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... | Defining a Form with Multiple TopicsThe Form Template can also be defined in an alternative way by using more then one topic:
Example: WebFormTemplate
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible Form Templates. Example:
Including Forms in New TopicsWhen 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:
formtemplate parameter in the URL.
Setting Up Multiple Form Options
Form Template Data StorageThe Form Template topic name, fields and values are stored as Meta Data. The order of field/value pairs in the Meta Data is the same as in the Template. -- JohnTalintyre - 16 Aug 2001 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
On this page:
TWiki Form TemplatesForm-based input in topics, with name/value pairs stored as Meta Data variables; multiple forms per web & topicOverviewBy 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. 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: | ||||||||||||||||||||
| |||||||||||||||||||||
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.
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 . | |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Form Template Elements | ||||||||||||||||||||
> > | Defining a Form Template | ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | A Form Template is simply a page containing your form, defined in a table where each row is one form field.
Form Template Elements | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Defining a Form Template | ||||||||||||||||||||
> > | Defining a Form in One Topic | ||||||||||||||||||||
Deleted: | |||||||||||||||||||||
< < | A Form Template is simply a page containing your form, defined in a table where each row is one form field. | ||||||||||||||||||||
Example: WebFormTemplate from the TWiki.Know web| *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... | | |||||||||||||||||||||
Deleted: | |||||||||||||||||||||
< < | |||||||||||||||||||||
Deleted: | |||||||||||||||||||||
< < | Defining a Form in One TopicExample: WebFormTemplate from the TWiki.Know web | ||||||||||||||||||||
| |||||||||||||||||||||
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: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Code from: | ||||||||||||||||||||
> > | Example: WebFormTemplate | ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > | | ||||||||||||||||||||
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Implementation Notes | ||||||||||||||||||||
> > |
| ||||||||||||||||||||
Deleted: | |||||||||||||||||||||
< < |
| ||||||||||||||||||||
Enabling Forms by WebForms are enabled on a per web basis. TheWEBFORMS variable in WebPreferences is optional and defines a list of possible Form Templates. Example:
| |||||||||||||||||||||
Changed: | |||||||||||||||||||||
< < | Creating New Topics with Forms | ||||||||||||||||||||
> > | Including Forms in New Topics | ||||||||||||||||||||
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. | ||||||||||||||||||||
> > | 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: | ||||||||||||||||||||
Added: | |||||||||||||||||||||
> > |
| ||||||||||||||||||||
A form embedded in a topic also appears in a new topic. This is done by specifying the formtemplate parameter in the URL.
Setting Up Multiple Form Options
Form Template Data StorageThe Form Template topic name, fields and values are stored as Meta Data. The order of field/value pairs in the Meta Data is the same as in the Template. -- JohnTalintyre - 16 Aug 2001 |
| |||||||||||||||||
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 | ||||||||||||||||
OverviewBy 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. | ||||||||||||||||
Added: | |||||||||||||||||
> > |
Changes from the Category Table SystemForm Templates more powerful, flexible replacement for the original TWikiCategoryTable. Data from existing category tables can be imported directly. Main changes from TWikiCategoryTable:
Importing Existing Category Table DataOn 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 oldtwikicatitems.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
Defining a Form TemplateA Form Template is simply a page containing your form, defined in a table where each row is one form field.
| |||||||||||||||||
Changed: | |||||||||||||||||
< < | Example: Form Template | ||||||||||||||||
> > | Example: WebFormTemplate from the TWiki.Know web | ||||||||||||||||
Changed: | |||||||||||||||||
< < |
|