You are here

function imagefield_tokens_field_widget_form_alter in ImageField Tokens 7

Implements hook_field_widget_form_alter().

File

./imagefield_tokens.module, line 157
Implements image Alt and Title field defaults with support for tokens.

Code

function imagefield_tokens_field_widget_form_alter(&$element, &$form_state, $context) {
  if ($context['field']['type'] == 'image') {
    foreach (element_children($element) as $delta) {
      $element[$delta]['#process'][] = 'imagefield_tokens_field_widget_process';
    }
  }
}