change image title from textfield to text area
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
parent
de59738907
commit
93c278c5e8
17
template.php
17
template.php
@ -214,3 +214,20 @@ function guibik_form_node_form_alter(&$form, &$form_state){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function guibik_image_field_widget_process($element, &$form_state, $form){
|
||||||
|
$element['title']['#type'] = "textarea";
|
||||||
|
return $element;
|
||||||
|
}
|
||||||
|
|
||||||
|
function guibik_field_widget_form_alter(&$element, &$form_state, $context) {
|
||||||
|
// dsm($context['field']['type'], '$context[field][type]');
|
||||||
|
|
||||||
|
if ($context['field']['type'] == 'image') {
|
||||||
|
foreach ($element as $delta => $item) {
|
||||||
|
if(!isset($element[$delta]['#process']) || !is_array($element[$delta]['#process']))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$element[$delta]['#process'][] = "guibik_image_field_widget_process";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user