what I need is "onSubmit" to get the "query" value, and put it in the "_search_all" route, normally this would look like => {{ path('_search_all', {'slug': query_val} ) }}
this way I can get a route like this in my browser localhost/search-all/symfony2
The current form
<form class="searchbar" method="POST" action="{{ path('_search_all') }}">
<input name="submit" type="submit" value="Search"/>
<span>
<input type="text" name="query" required/>
</span>
</form>
Solutions so far:
-
method="GET"
however this will create the "ugly" looking url - use the
friendsofsymfony/jsrouting-bundle
any inputs are welcome