June 2013

Entities and attached fields: how to get the form array for the fields

Matthias Weiss's picture
Matthias Weiss

There are times when you want to display parts of an entity to the user, pariticularily a specific list of fields that are attached (bundled) to that entity. Core doesn't offer functionality for this so I'll show you a simple function for extracting the form array structure for a selectable list of fields of an entity.