diff --git a/drupalorg_crosssite.module b/drupalorg_crosssite.module index 98d6835..1c524b3 100644 --- a/drupalorg_crosssite.module +++ b/drupalorg_crosssite.module @@ -623,8 +623,12 @@ function drupalorg_crosssite_form_search_theme_form_alter(&$form, $form_state) { $form['search_theme_form']['#default_value'] = $query->getParam('q'); } - $form['search_theme_form']['#title'] = t('Search @site_name', array('@site_name' => variable_get('site_name', 'Drupal'))); - + // Make sure that the text in the search box is a placeholder and it not + // sent as a query whenever people search for empty queries + $placeholder = t('Search @site_name', array('@site_name' => variable_get('site_name', 'Drupal'))); + $form['search_theme_form']['#attributes'] = array('placeholder' => $placeholder); + unset($form['search_theme_form']['#title']); + // Only show meta-types if searching on the main site. if (variable_get('drupalorg_site', 'main') === 'main') { $form['advanced'] = array(