Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Search

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

ALERT! 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

Change status to:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2006-10-07 - 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.