10.5. Summary

Creating a custom field type, field value, and field control is one of the more complicated and complex SharePoint subjects. SharePoint ships with many OOTB field types, otherwise known as field controls. Each has its own editing experience. While these field types provide solutions for many data storage needs in SharePoint projects and applications, sometimes they don't meet a project's requirements. In these cases, creating custom field types and controls makes the most sense.

This chapter explained how to create a custom field type that stores a complex data type. The two values are country and state/region (depending on the country selected). The field type contains special validation to ensure that the minimal and/or required fields are entered when editing a field that utilizes the type. The complex field value is represented in a custom class that other developers can utilize when interfacing with fields that use the custom field type.

To provide a custom editing experience, this chapter demonstrated how to create a custom field control. Not only does the control include the capability to provide a unique editing experience for content owners, it also includes a special rendering when the control is viewed in a design-time experience in a tool such as SPD. In addition, this chapter demonstrated how to create a custom field control utilizing an existing field type. After creating the custom field control, with either a custom or out-of-the-box field type, the ...

Get Professional SharePoint® 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.