Thank you for visiting DrupalPicchu! Please read our review!

Tutorial: Custom Field Types in Drupal 7

Track: 
Workshops
Motivation: 

Everyone uses Drupal's field system, but few engage the power of creating custom field types. Some have complained about the perceived inefficiency of Drupal 7's database schema, and proposed alternatives like 'pbs' module have failed to take hold, perhaps because there is a better way. Developers who want to implement complex, multi-value fields, or who wish to maximize control of database schemas for fields need to understand the Field APIs to be presented in this workshop.

Brief Description: 

Prerequisites: PHP knowledge is required; most of the presentation will be code demonstrations. Attendees will most benefit from this presentation if they come with an understanding of how custom modules are built -- i.e., info files and hooks.

Creating custom fields types in Drupal 7 is easy once you know the basics, and it can improve performance, usability, and flexibility for your project. If you've ever felt like you were abusing Field Groups, or you've gotten nervous about the number of field tables in your SQL database, or your node form is a nightmare for your content editors, come to this session. This will be a technical tutorial with code samples.

From the docs: "The bulk of the Field Types API are related to field types. A field type represents a particular type of data (integer, string, date, etc.) that can be attached to a fieldable entity. The Field Types API also defines two kinds of pluggable handlers: widgets and formatters, which specify how the field appears in edit forms and in displayed entities. Widgets and formatters can be implemented by a field-type module for its own field types, or by a third-party module to extend the behavior of existing field types."

Get the code from the Git Sandbox: http://drupal.org/sandbox/matt2000/1430442

Speaker's Biography: 
See previous session submission.
Language: 
English
Audience: 
Advanced