Question
I am trying to use a variable as a search parameter as in the case below. I can get it to work with simple variables, but not using the FORMFIELD which I need.
%SEARCH{ search="%FORMFIELD{Title}%" limit="5" scope="text" nototal="on" }%
I have tried a whole bunch of variations of the same thing and I can't get it to work. Please Help. Thanks.
Environment
--
JasonFalk - 29 Sep 2006
Answer
I tried your search and it does work in the lastest version of TWiki (4.0.4). I can't comment on whether it should work in Cairo (if you listed your version correctly) or how to get it to work.
--
LynnwoodBrown - 29 Sep 2006
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
This does not work in
TWikiRelease04Sep2004 because SEARCH is evaluated before FORMFIELD. You need to upgrade your TWiki. Or try this (untested) nested SEARCH, which might have a performance issue:
%SEARCH{ "Title" topic="%TOPIC%" nosearch="on" nototal="on" format="$percntSEARCH{ \"$formfield(Title)\" limit=\"5\" nototal=\"on\" }$percnt" }%
--
PeterThoeny - 30 Sep 2006
you could probably do a form submit back to itself to be able to use the
$formfield() value rather than the nested search. This would, however, require either a mouse click to run the search, or an onLoad event in your body tag to submit itself automatically.
--
MatthewCardozo - 06 Oct 2006
Closing question...
--
PeterThoeny - 07 Oct 2006