Skip to content

Instantly share code, notes, and snippets.

@waako
Forked from mareksotak/gist:3835642
Created October 4, 2012 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waako/3835713 to your computer and use it in GitHub Desktop.
Save waako/3835713 to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_form_alter().
To Replace the -Any- value in filters by it's label text
*/
function theme_form_alter(&$form, &$form_state, $form_id) {
kpr($form);
if ($form['#id'] == 'views-exposed-form-admin-people-block-1') {
// $my_label = 'label name';
foreach($form['#info'] as $key => $filter) {
if (stripos($key, 'filter-field') !== 0) {
$my_label = $form['#info'][$key]['label'];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment