Creating custom field with Display Suite and Profile 2 I am trying to use Display Suite (newest version) to format the profile page for users. I am using the Profile2 module and the default main-profile type. I have the user's full name (not username) split into the fields for first, middle, and last. I am trying to create a custom field to combine these three fields as the full name.

I am trying to create a code field but I don't know what variable or replacement pattern to use. There is nothing in the list of available tokens. I have tried php using $content and $entity and get undefined variable errors. 

How can I create a custom field in Display Suite to combine these three fields from a Profile2 entity?
Enough trial and error and I finally figured it out. I ended up using Display Suite Code as the text format, but writing php code in the field code box.

And to grab the first name the code was: $entity-&gt;field_first_name['und'][0]['safe_value'].