You are here

function _select_or_other_title_display in Select (or other) 6.2

Same name and namespace in other branches
  1. 6 select_or_other.module \_select_or_other_title_display()

Mimics Drupal 7 #title_display attribute, which removes the #title attribute. Using the #pre_render callback ensures that the #title attribute is still available during validation.

Please revert the patch at http://drupal.org/node/740522 when upgrading to Drupal 7.

1 string reference to '_select_or_other_title_display'
select_or_other_process in ./select_or_other.module
Process callback for a Select (or other) element.

File

./select_or_other.module, line 210
The Select (or other) module.

Code

function _select_or_other_title_display($element) {
  if (isset($element['#title_display']) && $element['#title_display'] === 'none') {
    $element['select']['#title'] = NULL;
  }
  return $element;
}