Hi. There's information on how to remove this label using local.css, but how do I specify a label for the search box? Drupal 7 seems to have changed it from "search this site" to "search." Can this also be done with local.css?

Comments

Romejoe’s picture

I bellieve you can do it with display:none or just edit the template file.

tonyhspeaks’s picture

Hi. I decided to put a simple PHP print statement in the search-block-form.tpl.php file after copying the file to the theme directory. Now the file looks like this:

<div class="container-inline">
  <?php if (empty($variables['form']['#block']->subject)): ?>
    <h2 class="element-invisible"><?php print t('Search form'); ?></h2>
  <?php endif; ?>
<?php print "Search This Site: "; ?>
  <?php print $search_form; ?>
</div>
tonyhspeaks’s picture

Status: Active » Fixed

Hi. I decided to put a simple PHP print statement in the search-block-form.tpl.php file after copying the file to the theme directory. Now the file looks like this:

<div class="container-inline">
  <?php if (empty($variables['form']['#block']->subject)): ?>
    <h2 class="element-invisible"><?php print t('Search form'); ?></h2>
  <?php endif; ?>
<?php print "Search This Site: "; ?>
  <?php print $search_form; ?>
</div>

edited by silverwing - added code tag

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mariolina’s picture

Title: how do I add the lable "Search This Site" to search box? » How do I add the label "Search This Site" to the Search box?

Just fixed spelling to facilitate searching

agcilantro’s picture

I bellieve you can do it with display:none or just edit the template file.

Which template file is this? I looked through page.tpl.php, block.tpl.php and template.php and did not find the label for the search box in any of these.