Yesterday I had a hard time modifying the output of the Search Form of Drupal 7. I needed to modify its HTML, adding wrappers, changing the input to a
<button> tag, adding classes and additional markup to insert a font based icon into the button. I'm using the awesome Gumbyframework and took code from travisc's sandbox project, which itself seems to be heavily based on the Bootstrap theme for Drupal.
However, I like to start my themes from scratch with minimal overhead, so here's the stuff I extracted from above mentioned projects and changed a bit to make it work with my current setup (using Gumby 2.6.3).
Everything is inside the
template.php of my theme (MYTHEME), so change that to your theme name.
This will change the search block form as well as the search form on the search page itself. If you only want it to affect one of those just change the implementation of