We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>EmbedSearchForm (31 Aug 2002, JimLevin)
Tags:
create new tag
, view all tags

Question

I'm sure I'm missing something obvious, but I'm trying to figure how how to embed a search form that returns a formatted result. This is what I've tried

<form action="%SCRIPTURLPATH%/search%SCRIPTSUFFIX%/%WEB%/"><input type="hidden" name="format" value="   * $web.$topic $n      * $summary $n" />
Find Topics:  <input type="text" name="search" size="32" /> <input type="submit" value="Search" /> &nbsp;</form>

The search returns the result with the default formatting. Thanks in advance for any tips.

-- JimLevin - 29 Aug 2002

Answer

Although the answer appears to be at SearchScriptWithFormattedSearch I found that the $n in the above code did not create a 2 level list but appeared to be ignored.

-- JimLevin - 31 Aug 2002

The $n does produce a new line, look at the HTML source. The problem is that the search result does not seem to render the asterisks into bullets.

A better solution is to use a form and an embedded FormattedSearch on the same topic. You can link them together with an %URLPARAM{"..."}% variable. Example: (edit the topic to see how it works)

Find Topics:

Result:

-- PeterThoeny - 31 Aug 2002

Yes. This works perfectly. Thank you very much.

-- JimLevin - 31 Aug 2002

Topic revision: r5 - 31 Aug 2002 - 14:29:29 - JimLevin
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback