Tags:
create new tag
view all tags

Question

Hi, I am a very new user of TWiki. I have created a web called Summaries. This web has a Twiki form which has some formfields such like: Title, Author, Year, Publisher and Summary. What I'd like to do is to let the user search for Title, Author,... in the corresponding field. I'd like to have a drop box which let the user choose one of the field (Title/Author/...). Then another text box for the user to enter the text that (s)he wants to search. Twiki will search the text in the selected field only and then display the result. How can I do that? I can't search an input text in an input form field.

For example:

Select the form field:
Enter the text:

If I select Author, then enter a text say John Gates

How can I get the result say:

Form field Key word Summary
Author John Gates He wrote a book called "My name is John"


(my twiki page: http://www-appn.comp.nus.edu.sg/~rpnlpir/twiki/bin/view.cgi/Main/WebHome)

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- ThienAnVo - 01 Mar 2004

Answer

I think that this is similar to the example on the bottom of FormattedSearch

-- SvenDowideit - 02 Mar 2004

An example in action is TWikiInstallations.

-- PeterThoeny - 01 Jun 2004

But it seems that all of the results will be displayed when the user haven't performed any search yet, right? How to avoid this? i.e. when the user hasn't chosen the formfield and entered key words yet, there will be nothing displayed in the result section; how to do this?

-- ThienAnVo - 13 Jun 2004

In the %SEARCH{}%, use a %URLPARAM{}% with a default="" value that never maches. For example, assuming you have a form field named query you can search like this:

%SEARCH{ "fOO_bAR" format="... }%

See details in TWikiVariables, TWikiVariables and FormattedSearch.

-- PeterThoeny - 15 Jun 2004

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2004-06-17 - ThienAnVo
 
  • 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.