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
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:
create WebPrefencesForm topic
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...
Edit WebPreferences, jump straight down to the form ignoring all the textarea stuff, and set as you like
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):
%EDITTABLE{ header="|*Name*|*Type*|*Size*|*Values*|*Tooltip message*|*Attributes*|" format="|text,20|text,20|text,20|text,20|text,20|text,1|" }%