Question
I would like to use a mechanism where users can CTRL-click a select list in a Form, after which the selected items are put into a text box (e.g. seperated by a comma).
Is this at all possible in TWiki?
Example:
A Form item 'Fruit' has multi-select box with the items:
The user CTRL-clicks on 'apple' and 'grape'. When the user clicks 'Save', the Form reads:
Fruit: apple, grape
Environment
--
JosMaccabiani - 15 Jun 2005
Answer
Are you referring to
TWikiForms? If so, this is not directly supported, but as a workaround you can define a
checkbox list. Example for definition:
TWiki supports also plain HTML, e.g. you can define a multi-select
<select>, but then you need a script to store the form data.
--
PeterThoeny - 16 Jun 2005
Thanks for your quick reply. It does inspire some new questions though.
On checkboxes: I have three lists with keywords to use in classifying 'knowledge topics'. These lists are 30+ items in size currently. So checkboxes are not really an option. (The form gets to big in edit mode)
I would like the end result to be at once user friendly (i.e. the multi-select) and restrictive (i.e. users cannot type in keywords themselves to prevent typos and really odd words which will not be retrieved by a search)
- I can see the use in a multi-select html form in a 'Create New Page' type setting (like AskedQuestions). I know how to create this dynamically now because of your nice answer in ExtractValuesFromTable. Any pointers to relevant topics for a script to put this info in the form?
- Is such a construct also usable once the form is in place to change values? Has anyone tried this?
--
JosMaccabiani - 16 Jun 2005
The current
TWikiForms handling does not support that. You could overload the functionality with a Plugin. See
FormFieldsPlugin for an example.
--
PeterThoeny - 03 Jul 2005
If all you are looking for is an example of a plugin that adds a field type, try
DateFieldPlugin.
--
CrawfordCurrie - 03 Jul 2005
Refactored out all comments related to PluginAddonsCorruptWhenDownloading
Also see
MultipleSelectionBox
--
JosMaccabiani - 02 Sep 2005