<p>&quot;Used by&quot; for fields counts field instances in field layouts, listed by field layout provider. E.g. if an instance of a field appears in a field layout, that usage's layout provider (i.e. entry type, asset volume, global set etc.) will be listed for the field in question.</p>
<p>&quot;Used by&quot; for entry types counts usages for that entry type in sections and Matrix fields.</p>
<p>It's currently not possible to register other &quot;usages&quot; for fields and entry types beyond this, but it'd be cool if Craft emitted events like <code>EVENT_DEFINE_FIELD_USAGES</code> and <code>EVENT_DEFINE_ENTRY_TYPE</code> when building the usages list – you might consider making <a href="https://github.com/craftcms/cms/discussions/new?category=ideas" rel="nofollow noreferrer">a feature request</a> for something like that.</p>

CC BY-SA 4.0
2024-11-30T22:35:41.603Z
2024-11-30T22:35:41.603Z
Mats Mikkel Rummelhoff
<p>I have a plugin that uses other fields and entry types. When you go into the Entry types overview &quot;Used by&quot; says &quot;no usage&quot; on these fields. How do I register the usage when I save my field settings?</p>
<p>My settings use this field:</p>
<pre><code>   $select_fields = Cp::checkboxSelectFieldHtml([
        'label'        =&gt; Craft::t( 'app', 'Allowed Fields' ),
        'instructions' =&gt; Craft::t( 'app', '' ),
        'id'           =&gt; 'my_fields',
        'name'         =&gt; 'my_fields',
        'values'       =&gt; $this-&gt;my_fields,
        'options'      =&gt; $options,
    ]);
</code></pre>

<plugin-development><entry-type><saveentry>
Set a field/entry type to used by plugin field
# Set a field/entry type to used by plugin field

(Asked by: username_0 on 2024-11-30)

I have a plugin that uses other fields and entry types. When you go into the Entry types overview "Used by" says "no usage" on these fields. How do I register the usage when I save my field settings?
My settings use this field:
   $select_fields = Cp::checkboxSelectFieldHtml([
        'label'        => Craft::t( 'app', 'Allowed Fields' ),
        'instructions' => Craft::t( 'app', '' ),
        'id'           => 'my_fields',
        'name'         => 'my_fields',
        'values'       => $this->my_fields,
        'options'      => $options,
    ]);

**Tags:** plugin-development, entry-type, saveentry

---

## 1 answers

### Answer by username_1 on 2024-11-30. Score: 1 | Accepted answer

"Used by" for fields counts field instances in field layouts, listed by field layout provider. E.g. if an instance of a field appears in a field layout, that usage's layout provider (i.e. entry type, asset volume, global set etc.) will be listed for the field in question.

"Used by" for entry types counts usages for that entry type in sections and Matrix fields.

It's currently not possible to register other "usages" for fields and entry types beyond this, but it'd be cool if Craft emitted events like `EVENT_DEFINE_FIELD_USAGES` and `EVENT_DEFINE_ENTRY_TYPE` when building the usages list – you might consider making [a feature request](https://github.com/craftcms/cms/discussions/new?category=ideas) for something like that.


---

