Hello, I have a bootstrap search form:

<form class="navbar-form" role="search"> <div class="input-group" style="width: 180px;"> <input type="text" autocomplete="off" class="form-control" placeholder="Search" name="search" id="search-input"> <span class="input-group-btn"> <button class="btn" id="srchbtn" type="btn-default"> <i class="fa fa-search" aria-hidden="true"></i> </button> </span> </div> </form> 

How can I make it so that when the search button is clicked, it switches to /search/test ? PS The pattern for replacing the get request in .htaccess is already registered.

    1 answer 1

     $('form').on('submit', function (e) { e.preventDefault(); window.location.assign('/search/test'); })