3

As someone relatively new to Craft I'm constantly switching between a content type and /admin/settings/fields so that I can see the handles for that content type. It just occurred to me that it would be relatively simple to show the handle right next to the field's name on the edit content screen. Might there be a setting for this somewhere, or would I have to (or be able to) create a plugin to do this?

In case it's unclear, I'm looking to turn this

enter image description here

into this

enter image description here

1
4

Original answer, for Craft 2:

There's a plugin called CP Field Links which will display field handles and provide easy access to field (and entry type) settings. Please note that the plugin requires devMode to be enabled.

I'm the plugin author, so just get in touch if you have any questions or spot any issues.

Updated answer, for Craft 3:

Craft 3.5+ can show field handles in element edit forms natively. To display the handles, the user needs to be an admin, and the "Show field handles in edit forms" user preference needs to be enabled (just visit your user's profile inside the Craft CP to toggle the setting on).

CP Field Links has been renamed CP Field Inspect, and is still relevant (as of Craft 3.7) as the native field handles still doesn't include links to field settings.

0
1

There currently isn't a setting to do this natively in Craft, but you might want to consider voting for some/all of these feature requests, which seem to be all along the same vein of what you're looking for.

1
  • That's exactly what I'm looking for! Voted for them both
    – lynn
    Dec 31 '15 at 7:35
1

If you are comfortable with your browsers developer tools, one way to get the field handle from an entry page that doesn't require any third-party plugins is to inspect the label or input element:

Inspect Element

The field handle appears:

  1. As the middle segment of the id attribute on the field's wrapper div
  2. As the final segment of the for attribute on the field's label
  3. As the final segment of the id attribute on the input element
  4. Within the fields[] array on the input element's name attribute

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.