You are here

function _custom_search_hide_label in Custom Search 6

Remove the label by adding a class.

2 string references to '_custom_search_hide_label'
custom_search_form_alter in ./custom_search.module
Implementation of hook_form_alter().
custom_search_taxonomy_form_alter in modules/custom_search_taxonomy/custom_search_taxonomy.module
Implementation of hook_form_alter().

File

./custom_search.module, line 479
Bring customizations to the default search box

Code

function _custom_search_hide_label($content, $elements) {
  if (strpos($content, '<label class') !== FALSE) {
    $content = str_replace('<label class="', '<label class="element-invisible ', $content);
  }
  else {
    $content = str_replace('<label', '<label class="element-invisible"', $content);
  }
  return $content;
}