Tags:
create new tag
view all tags

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:

  • apple
  • pear
  • grape

The user CTRL-clicks on 'apple' and 'grape'. When the user clicks 'Save', the Form reads:

Fruit: apple, grape

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat 9 Enterprise
Web server: Apache 1.3.33
Perl version: 5.8.5
Client OS: Win2k
Web Browser: IE6
Categories: Forms

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

Name Type Size Values Tooltip message
Fruit checkbox 3 apple, pear, grape Select fruit

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)

  1. 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?
  2. 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

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2005-09-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.