Difference: TWikiForms (18 vs. 19)

Revision 192004-08-15 - PeterThoeny

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 42 to 42
 
  1. Save the topic (you can later choose to enable/disable individual forms).

Changed:
<
<
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... |
>
>
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... |
 
Name Type Size Values Tooltip message
Changed:
<
<
TopicClassification select 1 NoDisclosure, PublicSupported, PublicFAQ blah blah...
OperatingSystem checkbox 3 OsHPUX, OsLinux, OsSolaris, OsWin blah blah...
OsVersion text 16   blah blah...
>
>
TopicClassification select 1 NoDisclosure, PublicSupported, PublicFAQ blah blah...
OperatingSystem checkbox 3 OsHPUX, OsLinux, OsSolaris, OsWin blah blah...
OsVersion text 16   blah blah...
 

Defining a Form with Multiple Topics

Line: 68 to 64
 
Example: WebFormTemplate
Changed:
<
<
  • Know.WebFormTemplate main definition:
>
>
  • WebFormTemplate main definition:
 
 
Name Type Size Values Tooltip message
Changed:
<
<
TopicClassification select 1   blah blah...
OperatingSystem checkbox 3   blah blah...
OsVersion text 16   blah blah...
>
>
TopicClassification select 1   blah blah...
OperatingSystem checkbox 3   blah blah...
OsVersion text 16   blah blah...
 
ALERT! Leave the Values field blank.
Changed:
<
<
  • Know.TopicClassification field value definition:
>
>
  • TopicClassification field value definition:
 
 
Name Type Tooltip message
Changed:
<
<
NoDisclosure option blah blah...
PublicSupported option blah blah...
PublicFAQ option blah blah...
>
>
NoDisclosure option blah blah...
PublicSupported option blah blah...
PublicFAQ option blah blah...
 

  • Implementation Notes: This format allows you to define field items with or without WikiNames, depending on your needs.
Line: 106 to 102
 
  • Additionally a new topic can be given a Form using the formtemplate parameter in the URL. Initial values can then be provided in the URLs or as form values:
    • other than checkboxes: name, ex: ?BugPriority=1
Changed:
<
<
    • checkbox: namevalue=1, ex: ?ColourRed=1.
>
>
    • checkbox: namevalue=1, ex: ?ColorRed=1.
  Boxes with a tick must be specified.

Setting Up Multiple Form Options

Line: 144 to 140
  TIP NOTE: If things aren't working correctly, there may be useful entries in data/warning.txt.
Added:
>
>

Using Forms For Settings

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

  1. create WebPrefencesForm topic
  2. fill it with a table like this:
    | *Name*|*Type*|*Size*|*Value*|*Tooltip message*|*Attributes*|
    | WEBTOPICLIST |textarea| |     | List of topics of the %WEB% web |S|
    | SITEMAPLIST  |select  |3| on, | list this web in the Site Map  |S|
    | SITEMAPWHAT  |textarea| |     | short web summary             |S|
    | WEBBGCOLOR   |text    |8|     | Web specific background color |S|
    etc...
  3. Edit WebPreferences and:
    • Add or Change the form to WebPrefencesForm
    • add WebPrefencesForm to the Set WEBFORMS line
    • Save
  4. Edit WebPreferences, jump straight down to the form ignoring all the textarea stuff, and set as you like
  5. if everything works as you like it, you can delete the Set statements (the form overrides set if they are both used).

Notes:

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.

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:

%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):

Name Type Size Values
<-- -->
Sorted ascending
tooltip message Attributes
NOSEARCHALL text   ",on" "Exclude web from a web=""all"" search: (Set to on for hidden webs)" S
FINALPREFERENCES textarea   "NOSEARCHALL, ATTACHFILESIZELIMIT, WIKIWEBMASTER, WEBCOPYRIGHT, WEBTOPICLIST, DENYWEBVIEW, ALLOWWEBVIEW, DENYWEBCHANGE, ALLOWWEBCHANGE, DENYWEBRENAME, ALLOWWEBRENAME" Web preferences that are not allowed to be overridden by user preferences S
SITEMAPLIST select   "on, ," List this web in the SiteMap S
SKIN select   "twiki, free, gnu, koala, pattern, plain, tiger" list of installed skins S
SITEMAPUSETO textarea   ...to do something. ...to do something. S
SITEMAPWHAT textarea   Describe what this web does. Describe what this web does.  
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
ALLOWWEBRENAME textarea   TWikiAdminGroup Users or groups who are allowed to rename topics in the TWiki web: (See TWikiAccessControl) S
ALLOWTOPICCHANGE textarea     Users or groups allowed to change or rename this TWikiForms topic: (I.e. TWikiAdminGroup) S
ALLOWWEBCHANGE textarea     Users or groups who are allowed to change topics in the TWiki web: (See TWikiAccessControl) S
ALLOWWEBVIEW textarea     Users or groups who are allowed to view topics in the TWiki web: (See TWikiAccessControl) S
DENYWEBCHANGE textarea     Users or groups who are not allowed to change topics in the TWiki web: (See TWikiAccessControl) S
DENYWEBRENAME textarea     Users or groups who are not allowed to rename topics in the TWiki web: (See TWikiAccessControl) S
DENYWEBVIEW textarea     Users or groups who are not allowed to view topics in the TWiki web: (See TWikiAccessControl) S
WEBFORMS textarea     TWikiForms: How to enable form(s) S
WEBTOPICLIST textarea   WebHome, Changes, Topics, Index, Search, Go the main entry point topics for this web S
<-- /editTable -->
 -- TWiki:Main.JohnTalintyre - 16 Aug 2001
-- TWiki:Main.MikeMannix - 05 Jan 2002
Changed:
<
<
-- TWiki:Main.PeterThoeny - 25 Apr 2004
>
>
-- TWiki:Main.PeterThoeny - 25 Apr 2004
-- TWiki:Main.MattWilkie - 27 Jul 2004
 

META TOPICMOVED by="MikeMannix" date="1000277489" from="TWiki.TWikiFormTemplate" to="TWiki.TWikiForms"
 
This site is powered by the TWiki collaboration platformCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiForms.