search_input
The search_input tag is a single tag. This tag will provide a text entry field for search parameters and an optional button to initiate the search.
attributes
section="unset"
html_id="unset"
button="unset"
size="15"
form="search_input"
match="exact"
presentation
label="Search"
wraptag="p"
class="search_input"
genealogy
Version 4.3.0
Version 4.0.7
Display a search input form
<txp:search_input label="Search" button="Search" size="20" wraptag="div" />
Elements required for building a customized (X)HTML search form
You can build your own custom search form (in a TXP form, like you do with e.g. the article tag) by specifying form=“txpformname” inside the <txp:search_input /> tag.
The following is the content of txpformname and shall depict the absolute minimum of tags and attributes required:
<form action="<txp:site_url />">
<input type="text" name="q" />
</form>
If you use a customized TXP form, Textpattern doesn’t automatically wrap the (X)HTML form output with form tags, so you need a pair of those to enclose your code. The name=“q” attribute/value pair inside the text input tag is required for even initiating a search query.
Textpattern, as of this writing, will use a user defined form named search_results, or an internally defined default form if no search result form is defined by you.
Other tags used: site_url