Anatomy of a Formtool

Work In Progress

Formttools are designed to work in conjunction with the FarCry content type. They use the type metadata cached in memory to determine how the display and edit views of specific properties should be rendered.

Each *formtool* is a component with a minimum of three methods:

  • render the edit html representing a form field for the content type property
  • render display html for the content type property
  • server side validation or data massaging for the property value prior to committing to the database

All aspects of the various "formtool" behaviours can be overridden by the developer by simply adjusting the attributes passed into the relevant form tool tag.

Although typically accessed through a library of custom tags, formtools are built on a core component library that can be extended. Formtools can be extended or supplemented either in your project or through a shareable library of FarCry code. There is also a custom tag library available (./core/tags/formtools) that simplifies their use.