I think you got a good answer by @gandalf458 already, suggesting to implement some cusomizable search you can find.
If you whish to program it yourselt you could send the query to a result page on your site to avoid the user leaves your site.
As aready said, you can't omit the "acton" attribute. The form you posted will not submit the query anywhere, not even the current page.
IIRC one could put a simple search form to search the site that sends the input query to a suitable search engine of your choice, e.g. www.ixquick.com. This example will replace the current window with the search engine's result page..
<form action="https://ixquick.com/do/search" method="post">
<input name="all_terms" placeholder="Find on this site" type="text">
<input name="with_domain" value="YourSite.com" type="hidden">
<input value="Search this site" type="submit">
<div>(Found results links back to this site.)</div>