You are here: Foswiki>Tasks Web>Item2478 (16 Feb 2012, PaulHarvey)Edit Attach

In WebPreferences I set
  • Set WEBFORMS = %SEARCH{ "Form$" scope="topic" type="regex" format="$topic" separator=", " nonoise="on" }%

There are a few more places where I've desired to generate perference values. Obviously, there could be a performance hit of using a search here, but if cached that could be acceptable.

This appears to give a perfectly valid WEBFORMS value.

However, clicking add form on a page results in

Possible form templates


Searched: name="formtemplate
Number of topics: 0

A corrupted version of chooser form.

That's because what you are trying to do is not valid. Here's how it works:

  1. You set the variable WEBFORMS to the value %SEARCH{...}%
  2. TWiki parses that value into a list, separating on ,
  3. TWiki formats the list as an option select

Note the missing step between 1 and 2; TWiki does not expand variables embedded into the list of forms.

You can try requesting this as an enhancement, of course. Raise a brainstorm topic in Codev.

CC


Oops - I created Item11527 before I found this one. Closing this as duplicate.

-- PaulHarvey - 16 Feb 2012

ItemTemplate edit

Summary Using %SEARCH% in WebPreferences:WEBFORMS results in broken Add Form list
ReportedBy TWiki:Main.JadeCravy
Codebase
SVN Range Mon, 05 Jun 2006 build 10479
AppliesTo Engine
Component
Priority Enhancement
CurrentState Duplicate
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r6 - 16 Feb 2012, PaulHarvey
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy