Improvements in template.php for solr search input