I guess this is not restricted to the search-box but in my page.tpl.php I have several calls like this:

<?php if ($search_box): ?>
				<div id="search-box">
					<?php print $search_box; ?>
				</div> 
			<?php endif; ?>

Say I need to edit the contents of this $search_box, where/how do I do this?

Thanks!

Comments

tdailey’s picture

You'll need to write a custom module. See safari search for an example. It's not too hard, here's the entire module:

function safarisearch_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'search_form':
    case 'search_theme_form':
    case 'search_block_form':
      drupal_add_css(drupal_get_path('module', 'safarisearch') .'/safarisearch.css');
      drupal_add_js(drupal_get_path('module', 'safarisearch') .'/safarisearch.js');
      break;
  }
}