<p>There's already a popular feature request for this:<br>
<a href="http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/7179163--entry-type-setting-for-entries-fields">"Entry Type" setting for Entries fields</a></p>

<p>But yes, it's currently also possible to do this by extending the default entries field type
and adding your custom criteria with <code>getInputSelectionCriteria()</code>.</p>

<pre><code>class BusinessLogic_CustomEntriesFieldType extends EntriesFieldType
{
    public function getName()
    {
        return Craft::t('Entries (custom)');
    }

    protected function getInputSelectionCriteria()
    {
        return array(
            'level' =&gt; 2
        );
    }
}
</code></pre>

CC BY-SA 3.0
2015-10-26T09:43:54.133Z
I have up voted that feature. I'll have a look at extending that field.

Many thanks!
Andy
CC BY-SA 3.0
2015-10-26T10:38:17.857Z
Thanks that worked a treat! I'm going to add an additional input so you can specify the level.
Andy
CC BY-SA 3.0
2015-10-23T13:34:11.957Z
2015-10-23T13:34:11.957Z
carlcs
<p>I have an entires field which is using a structure as a source. 
The structure has 3 levels and I would like to be able to limit it so the user can only select entries at the second level.</p>

<p>I've had a look through the docs and at the field settings but it doesn't seem to be doable. If anyone knows a work around or a plugin which can do this that would be great. I wonder if it is possible to create a plugin to extend this field to do this if not?</p>

<relations><structure><entries-field>
Is it possible to limit the level at which entries can be selected from within an entries field?
# Is it possible to limit the level at which entries can be selected from within an entries field?

(Asked by: username_0 on 2015-10-23)

I have an entires field which is using a structure as a source.
The structure has 3 levels and I would like to be able to limit it so the user can only select entries at the second level.

I've had a look through the docs and at the field settings but it doesn't seem to be doable. If anyone knows a work around or a plugin which can do this that would be great. I wonder if it is possible to create a plugin to extend this field to do this if not?

**Tags:** relations, structure, entries-field

---

## 1 answers

### Answer by username_1 on 2015-10-23. Score: 5 | Accepted answer

There's already a popular feature request for this:
"Entry Type" setting for Entries fields
But yes, it's currently also possible to do this by extending the default entries field type
and adding your custom criteria with getInputSelectionCriteria().
class BusinessLogic_CustomEntriesFieldType extends EntriesFieldType
{
    public function getName()
    {
        return Craft::t('Entries (custom)');
    }

    protected function getInputSelectionCriteria()
    {
        return array(
            'level' => 2
        );
    }
}

> **Comments:**
> **username_0**: I have up voted that feature. I'll have a look at extending that field.  Many thanks!  
> **username_0**: Thanks that worked a treat! I'm going to add an additional input so you can specify the level.  

---

