In the field.tpl.php
the following code:
<div class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php if (!$label_hidden): ?>
<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div>
<?php endif; ?>
The code is printing the label of the field. I want to set, conditionally, $label_hidden = false
from more general place other than the field.tpl.php
itself.
I tried the following snippet from template.php:
function my_foundation_preprocess_field(&$variables){
print_r($variables);
}
To get the value I mean but all I found is [#label_display] => hidden
as an array element. In addition, the form I meant with is not found in that array, the search form.
So I need a way to set $label_hidden = true to prevent the Search label of the search text box.