You are here

function elements_element_info_alter in Elements 7

Implements hook_element_info_alter().

File

./elements.module, line 94

Code

function elements_element_info_alter(&$types) {

  // Add placeholder and pattern support to core form elements.
  foreach (array_keys($types) as $type) {
    switch ($type) {
      case 'textfield':
      case 'textarea':
      case 'password':
        $types[$type]['#process'][] = 'elements_process_placeholder';
        $types[$type]['#process'][] = 'elements_process_pattern';
        break;
    }
  }
}