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
|