Created
April 17, 2014 02:08
-
-
Save flashvnn/10948173 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function famiana_helper_field_widget_image_image_form_alter(&$element, &$form_state, $context) { | |
foreach (element_children($element) as $item) { | |
$element[$item]['#process'][] = 'famiana_helper_image_field_widget_process'; | |
} | |
} | |
function famiana_helper_image_field_widget_process($element, &$form_state, $form){ | |
if(isset($element['alt'])){ | |
$element['alt']['#type'] = 'textarea'; | |
$element['alt']['#weight'] = 0; | |
} | |
return $element; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment