• Developer
  • Field Types
Search »

Custom Fields

When to use?

Since field types can be created and managed separately through both separate modules or the Custom Fields module, which should you choose? Which is a better fit for what you're trying to do?

What it's good for

The Custom Fields module provides a relatively simple interface for creating and managing your field types, so for things like making small change to the field types, adding new (simple) ones, adding validation rules, adding new settings and so on and so forth, it's perfect.

For example, once browsers implement the new HTML5 standards better and we start seeing sliders and colour-pickers as native form elements, creating them through this module is an absolute breeze.

It's also exceedingly good as a workarea to try things out. The File upload, Google Maps and WYSIWYG modules were all initially created via this module. I moved them into separate modules for a number of reasons, including the fact that they are optional. Placing them in separate modules allows users to only install those component that they need.

What it's not good for

Advanced stuff. The file upload field, for example, is placed in a separate module due to the complex server-side code that is needed to handle all the different places that files are uploaded. The Custom Fields interface also doesn't allow you to override code or template hooks: for that, you'll need a separate module.

If you require separate resource files (JS, Flash etc), you can link to them via the module, but there's no facility to upload them to the site. So either you need to use FTP to upload them, or wrap them in a separate module.

Still Not sure?

If you're not sure about whether you should pick this module to create your field types / changes, pipe up in the forums and describe what you're trying to do. We'll try to help out!