edit search form in drupal

Joined: 12/05/2007

is there a simple way to edit the "size" attribute for a search form in a block?

Joined: 12/16/2007
CSS

I'd use css. Use the div id closest to your block, then the block class, then use the element tag to change the width and height properties, or if that doesn't work in a particular browser, you can use a custom image background and hide the default box entirely in a lot of browsers. You can also use font properties to change the size and family of the text typed into the search box.

Tony

Joined: 09/09/2008
The "official" way

I think that the generally accepted way to do what you want is to use hook_form_alter. I've seen examples and it looked pretty easy but I went looking for an example the other day and didn't quickly find one.

Another idea that I've seen, but couldn't find when I went looking, involves using JavaScript to eliminate the "SEARCH" button and any title and put "shaded" text in the box saying something like "Search This Site." As soon as the box gets focus the text is eliminated so the user can enter their search terms.

Maybe someone else will see this and lead us both to a solution.

Curt