Skip to main content
1 of 3
Adrian Cid Almaguer
  • 18.5k
  • 14
  • 79
  • 133

I'm sure that this is not the best option but at least it works.

Go to admin/structure/types/manage/YOUR_CONTENT_TYPE/display and select the Title Formatter for your field, and then use this code:

  $nid = 76;
  $node = Drupal\node\Entity\Node::load($nid);
  foreach ($node->field_aaaa as $i => $delta) {   
    dpm($delta->value);
    dpm($node->field_aaaa->view('full')[$i]['#markup']);
  }

You will see this:

* id_string1
* String 1
* id_string2
* String 2
* id_string3
* String 3
Adrian Cid Almaguer
  • 18.5k
  • 14
  • 79
  • 133