<<O>>  Difference Topic TWikiForms (r1.21 - 02 Mar 2006 - DmitryNPopov?)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiForms"
Line: 10 to 10

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 TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTables
>
>
Form Templates replace TWikiCategoryTables from the 01-Dec-2000 version of TWiki. - see #FormsVsCategoryTables

Defining a Form Template

Line: 39 to 39

  1. Create a new topic with your form name: YourForm, ExpenseReport, InfoCategory, RecordReview, whatever you need.
  2. Create a TWiki table, with each column head representing one element of an entry field: Name, Type, Size, Values, and Tooltip message (see sample below).
  3. For each field, fill in a new line; for the type of field, select from the list.
Changed:
<
<
  1. Save the topic (you can later choose to enable/disable individual forms).
>
>
  1. Save the topic (you can later choose to #EnablingFormsenable/disable individual forms).

Example: WebForm
Line: 83 to 83

  • Implementation Notes: This format allows you to define field items with or without WikiNames, depending on your needs.
    • Topics can be protected in the usual manner, using TWikiAccessControl, to limit who can change the form template and/or individual value lists.
Changed:
<
<
    • [[...]] links can be used to force a link (at present, the [[...][...]] format is not supported).
>
>
    • [[... links can be used to force a link (at present, the [[...... format is not supported).

    • The Tooltip message column is used as a tooltip for the field name (only if field name is a WikiName) - you only see the tooltip In edit.
    • The first item in the list is the default item. Alternative initial values can be set in a topic template, like WebTopicEditTemplate, with field=value, or, for checkboxes, field=1.
    • The topic definition is not read when a topic is viewed.
Line: 94 to 94

Forms are enabled on a per web basis. The WEBFORMS variable in WebPreferences is optional and defines a list of possible form templates. Example:
  • Set WEBFORMS = BugForm, FeatureForm, BookLoanForm
Changed:
<
<
  • With WEBFORMS enabled, an extra button is added to the edit view. If the topic doesn't have a Form, an Add Form button appears at the end of the topic. If a Form is present, a Change button appears in the top row of the Form. The buttons open a screen that enables selection of a form specified in WEBFORMS, or the No form option.
>
>
  • With WEBFORMS enabled, an extra button is added to the edit view. If the topic doesn"t have a Form, an Add Form button appears at the end of the topic. If a Form is present, a Change button appears in the top row of the Form. The buttons open a screen that enables selection of a form specified in WEBFORMS, or the No form option.

Including Forms in New Topics

Line: 119 to 119

Using Form Data

Changed:
<
<
TWikiForms 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.
>
>
TWikiForms 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 FormattedSearchTWiki? Formatted Search for various options.

Main Changes from Category Tables

Line: 138 to 138

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:
<
<
TIP NOTE: If things aren't working correctly, there may be useful entries in data/warning.txt.
>
>
TIP NOTE: If things aren"t working correctly, there may be useful entries in data/warning.txt.

Using Forms For Settings

Example process to change your WebPreferences to use forms instead of {3 spaces}* Set statements:
Line: 160 to 160

Notes:

Changed:
<
<
If it isn't working, double check that the 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.
>
>
If it isn"t working, double check that the 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 on WebPreferencesForm makes adding new prefedrences a breeze.

Changed:
<
<
A possibly unwanted side effect for using forms for the SKINS setting in their personal user topic: because the User Preferences are final you can't have different skins for different webs as the user's setting always wins. A workaround is to simply omit SKIN in the form.
>
>
A possibly unwanted side effect for using forms for the SKINS setting in their personal user topic: because the User Preferences are final you can"t have different skins for different webs as the user"s setting always wins. A workaround is to simply omit SKIN in the form.

Another example, this one using EditTablePlugin, source:

Line: 190 to 190

SKIN select   "twiki, free, gnu, koala, pattern, plain, tiger" list of installed skins S
WEBBGCOLOR select   lightpink, pink, crimson, lavenderblush, palevioletred, hotpink, deeppink, mediumvioletred, orchid, thistle, plum, violet, fuchsia, fuchsia, darkmagenta, purple, mediumorchid, darkviolet, darkorchid, indigo, blueviolet, mediumpurple, mediumslateblue, slateblue, darkslateblue, ghostwhite, lavender, blue, mediumblue, darkblue, navy, midnightblue, royalblue, cornflowerblue, lightsteelblue, lightslategray, slategray, dodgerblue, aliceblue, steelblue, lightskyblue, skyblue, deepskyblue, lightblue, powderblue, cadetblue, darkturquoise, azure, lightcyan, paleturquoise, aqua, aqua, darkcyan, teal, darkslategray, mediumturquoise, lightseagreen, turquoise, aquamarine, mediumaquamarine, mediumspringgreen, mintcream, springgreen, mediumseagreen, seagreen, honeydew, darkseagreen, palegreen, lightgreen, limegreen, lime, forestgreen, green, darkgreen, lawngreen, chartreuse, greenyellow, darkolivegreen, yellowgreen, olivedrab, ivory, beige, lightyellow, lightgoldenrodyellow, yellow, olive, darkkhaki, palegoldenrod, lemonchiffon, khaki, gold, cornsilk, goldenrod, darkgoldenrod, floralwhite, oldlace, wheat, orange, moccasin, papayawhip, blanchedalmond, navajowhite, antiquewhite, tan, burlywood, darkorange, bisque, linen, peru, peachpuff, sandybrown, chocolate, saddlebrown, seashell, sienna, lightsalmon, coral, orangered, darksalmon, tomato, salmon, mistyrose, lightcoral, snow, rosybrown, indianred, red, brown, firebrick, darkred, maroon, white, whitesmoke, gainsboro, lightgrey, silver, darkgray, gray, dimgray, black Web specific background color: (Pick a lighter one of the StandardColors) S
WEBFORMS textarea     TWikiForms: How to enable form(s) S
Changed:
<
<
WEBTOPICLIST textarea   WebHome, Changes, Topics, Index, Search, Go the main entry point topics for this web S
>
>
WEBTOPICLIST textarea   WebHome, WebChangesChanges?, WebTopicListTopics?, WebIndexIndex?, WebSearchSearch?, Go the main entry point topics for this web S

-- TWiki:Main.JohnTalintyre - 16 Aug 2001

Revision r1.20 - 20 Aug 2004 - 05:55 - PeterThoeny
Revision r1.21 - 02 Mar 2006 - 13:45 - DmitryNPopov?