Skip to content

Instantly share code, notes, and snippets.

@waako
Forked from soulston/gist:3835190
Created October 4, 2012 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save waako/3835276 to your computer and use it in GitHub Desktop.
Save waako/3835276 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';
$my_label = $form['#info']['filter-field_region_tid']['label'];
$form['field_region_tid']['#options']['All'] = $my_label;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment