# Show/hide forms or module based on the user's group

**URL:** <https://forum.dimagi.com/t/show-hide-forms-or-module-based-on-the-users-group/6216>\
**Category:** Users\
**Created:** [February 19, 2019, 1:25pm UTC](https://forum.dimagi.com/t/show-hide-forms-or-module-based-on-the-users-group/6216 "2019-02-19T13:25:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eyram\_Adzra](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@Eyram\_Adzra](https://forum.dimagi.com/u/Eyram_Adzra)\
**Post date:** [February 19, 2019, 1:25pm UTC](https://forum.dimagi.com/t/show-hide-forms-or-module-based-on-the-users-group/6216/1 "2019-02-19T13:25:32Z")

</div>

Hi everyone,

I have an app used by hundreds of people in the same country at the same level. I created reporting groups fro the MW and now want to hide the form from a certain date for some groups, and keep it live for some other groups. I am thinking about the display logic on the module but can't find how to target the groups as I can do with the individual usernames.

I could do it with the individual usernames with the " #user/username != 'user1' # but I am dealing with about 500 users here... Is there any way I can do this with reporting groups?

Thanks,

---

<div class="post-metadata">

**Author:** ![cstahl](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/cstahl/32/489_2.png) [@cstahl](https://forum.dimagi.com/u/cstahl)\
**Post date:** [February 19, 2019, 3:45pm UTC](https://forum.dimagi.com/t/show-hide-forms-or-module-based-on-the-users-group/6216/2 "2019-02-19T15:45:43Z")

</div>

It sounds like your best bet may be using [Custom User Data](https://confluence.dimagi.com/display/commcarepublic/Custom+User+Data) to achieve this. You can use this to create a new user property, and reference this user property in the display conditions of forms. This will still require you to define the user property for each user, but it makes your display condition far simpler, and allows you to import the changes to the user in bulk.

Hope this is helpful!

---

<div class="post-metadata">

**Author:** ![Eyram\_Adzra](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@Eyram\_Adzra](https://forum.dimagi.com/u/Eyram_Adzra)\
**Post date:** [February 27, 2019, 11:09am UTC](https://forum.dimagi.com/t/show-hide-forms-or-module-based-on-the-users-group/6216/3 "2019-02-27T11:09:15Z")

</div>

Hi Cody,

Thanks, this was really helpful! I was able to do what I had in mind.

Best,

---

<div class="post-metadata">

**Author:** ![Mazz](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/mazz/32/1004_2.png) [@Mazz](https://forum.dimagi.com/u/Mazz)\
**Post date:** [February 27, 2019, 11:26am UTC](https://forum.dimagi.com/t/show-hide-forms-or-module-based-on-the-users-group/6216/4 "2019-02-27T11:26:52Z")

</div>

I agree with Cstahl, i ended up using custom user data to show/hide forms. more reliable, and will not be affected with things like organizational structure and locations
