Custom fields: What are they?• Custom fields are like a custom data type• You can also have a custom widgets, formatters, validation
Custom Fields: What are they good for?• Drupal gives you text fields, date fields, etc.• It wont give you a colour field. Or a poutine field.• You may want multi-value with a fieldset.• Fancy widgets?• Fancy formatting?• Fancy validation?
AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
hook_field_formatter_view()• Take all the saved field items (i.e. each $delta) and return a renderable array for each$element = array( first poutine item ... );$element = array( second poutine item...);