Fields

Posted By Brad Czerniak on Thursday, October 23, 2014 - 15:30

Drupal developers [hopefully] find themselves writing "field formatters" fairly often. These pieces of code add ways to display the data stored in fields, so having an arsenal of formatters can come in handy.

Making formatters is often straightforward, but some of the work gets repetitive and tedious. The snippet below should allow you to at least get up to speed more quickly, if not make the "settings summary" a worry of the past.

The snippet

Posted By Brad Czerniak on Tuesday, March 19, 2013 - 15:03

Drupal developers tend to treat overriding theme functions as a last resort. However, it's sometimes necessary in order to eliminate default functionality provided by core.

One instance we recently found where the default theming was not to our client's expectations was the "unlimited" field widget (the widget is the form element on the edit screen, while a field formatter themes the output on the view screen). Unlimited widgets display with tabledrag re-ordering, without any option to disable it.