Skip to content

Instantly share code, notes, and snippets.

@junaidpv
Created August 25, 2015 07:59
Show Gist options
  • Select an option

  • Save junaidpv/e7b14611e3071f29f6e3 to your computer and use it in GitHub Desktop.

Select an option

Save junaidpv/e7b14611e3071f29f6e3 to your computer and use it in GitHub Desktop.
To make field label same as fields filling step.
diff --git a/media_browser_plus.module b/media_browser_plus.module
index 9feab9c..607c80b 100644
--- a/media_browser_plus.module
+++ b/media_browser_plus.module
@@ -834,9 +834,10 @@ function media_browser_plus_form_file_entity_add_upload_alter(&$form, &$form_sta
'vocabulary' => 'media_folders',
'parent' => 0,
);
+ $field_folder_info = field_info_field('field_folder');
$form['field_folder'][LANGUAGE_NONE] = array(
'#type' => 'select',
- '#title' => t('Folder'),
+ '#title' => $field_folder_info['label'],
'#description' => t('Defines the folder where the uploaded files will be saved'),
'#options' => taxonomy_allowed_values($field),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment