/
search_form
search_form
Renders a form with a text input as a search form. The first argument must be the query flag that is used to send the search query with as URL parameter.
Also accepts the following arguments:
url
: The URL to show the search results on (Optional, default: current url)form_class
: The html class for the search form tag. (Optional)Every other key-value argument will be used as html tags for the input.
The following generates a GET request for the search page '/search'.
{% search_form "q", url: "/search" %}
When submitted, the search form makes a GET request to the following url: '/search?q=<search query>'.
HTML output:
<form action="/search" class="">
<input type="text" name="q" value="">
</form>
, multiple selections available,
Related content
search_results
search_results
More like this
request
request
More like this
html_input
html_input
More like this
set_session
set_session
More like this
form_input_name
form_input_name
More like this
http_request
http_request
More like this