Developing custom-built Field Types
“Why should I care about custom-built field types when Drupal already provides me the essentials?“
Often we store information in our nodes (or whatever entity) in terms of groups of data (for example, a street address, city, state, and postal code), however, the most commonly used strategy has been to create individual fields and “glue” them all together to make them appear as they are coherent. This is simply wrong!
There is a huge difference between grouping a series of textfields together and calling it a “thing”, and using say, the address field module. With simply configuring individual fields together, there is a cost of performance, complexity, and an overhead of maintaining a lot of custom code (both in the back and front-end.)
By the end of this presentation, you will know how to:
- Define new field types and build their schema
- Create configuration forms for fields and their instances
- Properly validate data going into your fields and define what “empty” means
- Provide “widget” forms to create meaningful UI’s
- Provide a layer of configurations to the widgets themselves
The last component of this talk involves the “presentation layer” and is discussed in the “Advanced Theming: Writing Field Formatters” presentation.
- Login to post comments
Comments
Is this beyond the
Is this beyond the beginning/intermediate user?
Beyond beginners for sure.
Beyond beginners for sure. It’s a definite eye opener for intermediate users who are already comfortable with configuring fields; I’d recommend it.. But there will be a lot of “code talk” when I discuss the “how-to” parts.
Are you covering D6, D7, or
Are you covering D6, D7, or both?
Specifically Drupal 7, but
Specifically Drupal 7, but most of this can all be done in CCK in D6 as well :)