0

I have a virtual field that outputs a formatted string:

protected function _getDisplayName(){
  return $this->ref.' - '.$this->name;
}

I'm trying to use this output as the display filed like so:

$this->displayField('display_name');

But it seems to ignore it and display the enire object. Is this actually possible or am I barking up the wrong tree?

Kev Wilson
  • 470
  • 6
  • 19
  • see [this question](http://stackoverflow.com/questions/38425881/how-to-use-a-custom-format-for-multi-column-display-fields) and the relative answer. Your code is correct, but I suppose you are misunderstanding what displayField does: displayField is usefull just when your are usind `find('list')` – arilia Jul 18 '16 at 11:37
  • Yes your right, I'm getting mixed up. I hate Mondays! – Kev Wilson Jul 18 '16 at 12:53

0 Answers0