<p>Not natively, but there's the <a href="https://github.com/lindseydiloreto/craft-cpbodyclasses" rel="nofollow noreferrer">Control Panel Body Classes</a> plugin, which would enable you to add the handle for your "eventeers" User Group as a CSS classname to the <code>&lt;body&gt;</code> tag (i.e. <code>body.usergroup-eventeers</code>, if "eventeers" is the handle for your User Group).</p>

<p>With that classname in place, you could add some CSS to the Control Panel (easiest done w/ the <a href="https://github.com/lindseydiloreto/craft-cpcss" rel="nofollow noreferrer">CPCSS plugin</a>) to hide the particular field, e.g. w/ something like the following:</p>

<pre><code>body.usergroup-eventeers #fields-yourFieldHandle-field {
    display: none;
}
</code></pre>

<p>...or, if it makes sense, you could flip it around and have your field hidden by default, and visible only if the <code>&lt;body&gt;</code> has the <code>.userlevel-admin</code> classname - which would in effect hide the field from everybody except people w/ admin accounts:</p>

<pre><code>#fields-yourFieldHandle-field {
    display: none;
}

body.userlevel-admin #fields-yourFieldHandle-field {
    display: block;
}
</code></pre>

<p>(Obviously, you'll need to change the <code>yourFieldHandle</code> part for the field's selector to your field's actual handle.)</p>

<p>In any case, keep in mind that this will not be a <em>secure</em> solution in the sense that the field will still be there, and any tech-savvy "eventeer" user can easily make the field appear by removing the above CSS rule in their browser's dev tools. However, in the current iteration of Craft it's as close as you'll come to accomplish what you want.</p>

CC BY-SA 3.0
2017-11-22T17:19:33.113Z
There's also this feature request: https://github.com/craftcms/cms/issues/947
Brad Bell
CC BY-SA 3.0
2017-11-22T17:18:02.997Z
2017-11-22T17:29:27.943Z
2017-11-22T17:29:27.943Z
Mats Mikkel Rummelhoff
<p>I have a public registration form process which assigns a specific group/permissions 'eventeer' to a user. This user can then login and can enter/edit information in a 'shared' section. 'Shared' meaning both admins + eventeer groups use the same admin cp section form.</p>

<p>Issue: I have one field that I dont want to expose to an 'eventeer' but only expose for admin. Can this be accomplished with craft v2.6+ and/or plugin?</p>

<p>Thanks in advance.</p>

<permissions>
Permissions at field level. Can this be done?
# Permissions at field level. Can this be done?

(Asked by: username_0 on 2017-11-22)

I have a public registration form process which assigns a specific group/permissions 'eventeer' to a user. This user can then login and can enter/edit information in a 'shared' section. 'Shared' meaning both admins + eventeer groups use the same admin cp section form.

Issue: I have one field that I dont want to expose to an 'eventeer' but only expose for admin. Can this be accomplished with craft v2.6+ and/or plugin?

Thanks in advance.

**Tags:** permissions


---

## 1 answers

### Answer by username_1 on 2017-11-22. Score: 2 | Accepted answer

Not natively, but there's the Control Panel Body Classes plugin, which would enable you to add the handle for your "eventeers" User Group as a CSS classname to the  tag (i.e. body.usergroup-eventeers, if "eventeers" is the handle for your User Group).
With that classname in place, you could add some CSS to the Control Panel (easiest done w/ the CPCSS plugin) to hide the particular field, e.g. w/ something like the following:
body.usergroup-eventeers #fields-yourFieldHandle-field {
    display: none;
}

...or, if it makes sense, you could flip it around and have your field hidden by default, and visible only if the  has the .userlevel-admin classname - which would in effect hide the field from everybody except people w/ admin accounts:
#fields-yourFieldHandle-field {
    display: none;
}

body.userlevel-admin #fields-yourFieldHandle-field {
    display: block;
}

(Obviously, you'll need to change the yourFieldHandle part for the field's selector to your field's actual handle.)
In any case, keep in mind that this will not be a secure solution in the sense that the field will still be there, and any tech-savvy "eventeer" user can easily make the field appear by removing the above CSS rule in their browser's dev tools. However, in the current iteration of Craft it's as close as you'll come to accomplish what you want.

> **Comments:**
> **username_2**: There's also this feature request: https://github.com/craftcms/cms/issues/947  

---

