Modify Search form
hi
I am trying to add a search form to my site, but having a bit of confusion on styling and layout.
I know you can use the search-theme-form and other files for modification, but I need to have the search text and form displayed inline instead of going underneath some other content.
When I look at the source generated it seems that the search form gets a
<
div> after the form declaration and before the actual form field: Is there anyway to remove those extra
<
div>'s? I don't see it in any of the template search files.
Thanks
Frank
Good question, Frank.
I think what you're trying to modify is more a result of the Form API rather than the search form in particular. You can modify the output by creating a theme function for the form and doing some modifications there. I'm not sure if you can get rid of the div's that way, but you'll be able to get some additional control.
You can also specify an alternate theme function for a particular input (see http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....). I don't remember having ever done this myself, but it's another thing to explore.
Are you wanting to remove the div's just to clean up the output, or do you want to style it differently? If it's just a style thing, you should be able to make the modifications you need with a little CSS rather than overriding any theme functions.
Cheers!
Chris