craft.fields

This document is for a version of Craft CMS that is no longer supported. Please refer to the latest version →

You can access your site’s fields with craft.fields.

# Methods

The following methods are available:

# getFieldByHandle( handle )

Returns a Craft\FieldModel (opens new window) object representing a field by its handle.

{% set body = craft.fields.getFieldByHandle('body') %}
{{ body.instructions }}