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:
If I select Author, then enter a text say John Gates
How can I get the result say:
(my twiki page:
http://www-appn.comp.nus.edu.sg/~rpnlpir/twiki/bin/view.cgi/Main/WebHome
)
Environment
--
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