Powered by Blogger.

Get field label by the field name in drupal


Get field label by the field name in drupal

$entity_type = 'node';
$bundle_name = 'article';
$field_name = 'field_some_field';

$info = field_info_instance($entity_type, $field_name, $bundle_name);

$label = $info['label'];

No comments