Skip to content
Snippets Groups Projects
Commit 7d051bb1 authored by dqd's avatar dqd
Browse files

Update file link.module

parent 4a31314c
No related branches found
No related tags found
1 merge request!8Update file link.module
......@@ -1193,6 +1193,19 @@ function link_field_process($element, $form_state, $complete_form) {
return $element;
}
/**
* Implements template_preprocess_form_element_label().
*/
function link_preprocess_form_element_label(&$vars) {
$element = &$vars['element'];
if ('link_field' == $element['#type']) {
if (isset($element['url']) && !isset($element['title'])) {
// Link label directly to the URL field.
$element['#id'] .= '-url';
}
}
}
/**
* Implements hook_field_formatter_info().
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment