[Typo3] simple search form

Kraft Bernhard kraftb at gmx.net
Thu Feb 24 19:20:52 CET 2005


luca marletta wrote:
> I use a line like this:
> <td><input type="text" name="sword" value=""
> class="inputfields" style="width:125px;" title="Enter a search
> word"></td>

Use something like the following:
------------------------snip---------------------
<form action="index.php?id=###TARGET_PAGE_ID###&amp;no_cache=1" name="mysearch" enctype="multipart/form-data" method="post" target="page" onsubmit="return validateForm('mysearch','','','','')">
	<input type="hidden" name="stype" value="L0" />
	<input type="hidden" name="locationData" value="15:tt_content:39" />
	<input type="text" name="sword" size="20" value="" />
	<input type="hidden" name="scols" value="[pages.title-subtitle-keywords-description:tt_content.header OR tt_content.header-bodytext-imagecaption]" />
	<input type="submit" name="submit" value="Search now!" />
</form>
------------------------snip---------------------

replace ###TARGET_PAGE_ID### with the id of the page where the target search form
is.
pherhaps you can leave away "locationData" if not try to set
it to TARGET_PAGE_ID:tt_content:TARGET_SEARCHFORM_ID
that should work.

set "scols" to the columns in which the search should look into.
you can set them with
TABLE.FIELD1-FIELD2-FIELD3:TABLE.FIELD1-FIELD2:TABLE....

greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------



More information about the TYPO3-english mailing list