Tags:
create new tag
view all tags

Question

Is there a way that we can define a set of options within a TWikiForms dynamically using a search?

This question has been raised before - specifically in SearchInTwikiForms, UsingSearchWithTWikiForms. I suspect that this is actually a FeatureEnhancementRequest however there has been some related work that appears to almost address this but not quite. I'm referring to DynamicFormOptionDefinitions and FormattedSearchWithSeparatorParameter.

The problem is that is these enhancements do not seem to address the core issue with DynamicTWikiFormOptionDefinitions which is that while I can define a search within a TWikiForm that appears to be properly formatted, when the TWikiForm is actually displayed in edit view, the search variable is displayed as the option rather than the search results. I understand that this is because, as PeterThoeny explained elsewhere, variables get expanded "after the fact".

So it seems to me that DynamicFormOptionDefinitions and related enhancements do not really go all the way to achieving what I'm looking for here but I want check this conclusion.

Let me give a simple use case for what I'm describing here to make clear what I'm looking for. I've implemented a TopicClassification system on some TWiki installations I've worked with that accomodates creation of new classes wherein each class has it's own topic that lists all topics having that classification (see example here). To actually utilize the new classes as options within the WebForm, I need to manually go back an add them to the form in the TopicClassification topic. What I'd like to be able to do is simply include a search for all the TopicClassification topics in the WebForm.

It seems to me that this feature would open up a lot of options and if it's not currently possible would be worth considering.

Environment

TWiki version: TWikiAlphaRelease

-- LynnwoodBrown - 04 Dec 2003


Answer

I'm not sure if this will address your specific desire, but I was able to create a form select field which presented a list of all of the TWIKI User Registration topics and presented those values at run-time by:

  • Applying patch as described in HandleCommonTagsInFormDef
  • Creating a topic that that used %TOPICLIST{"format"}% to create the list of topic choices
  • In my form def I have an %INCLUDE% of the above topic.

This works like magic.

Hope this helps -- SteveRJones - 06 Dec 2003

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-01-09 - SteveRJones
 
  • 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.