function focal_point_field_widget_form_alter in Focal Point 7
Implements hook_field_widget_form_alter().
File
- ./
focal_point.module, line 203
Code
function focal_point_field_widget_form_alter(&$element, &$form_state, $context) {
$widget_type = $context['instance']['widget']['type'];
if (_focal_point_supported_widget_type($widget_type)) {
foreach (element_children($element) as $delta) {
$element[$delta]['#attributes']['class'][] = 'focal_point';
$element[$delta]['#process'][] = 'focal_point_widget_process';
$element[$delta]['#focal_point_id'] = drupal_html_id('focal-point-' . $context['instance']['field_name'] . '-' . $delta);
}
}
}