Nintex Forms hiding fields by group membership

This article explains how to hide fields on a Nintex form based on the current person’s membership in a group, for example making a field or fields only visible to the Site Owners group.

**If you want to hide fields based on any other criteria, like for example hiding a field based on a value selected in a dropdown field or only showing certain fields when editing a form (not on new forms). Please go to the Hiding fields using Rules tutorial.

Hiding based on membership in a SharePoint Group

Any field or fields you want to hide on a form should be placed in a panel. This will ensure both the field(s) and it’s label(s) are both hidden, and that there are no blank spots on the form where the fields used to be. In this tutorial we are going to make the Status field only visible to members of a specific SharePoint group. This is an excellent way to make a field or fields only visible to the people administering the process such as the Site Owners group for example.
1. Go to the list and open up Nintex Forms. The first thing we are going to do is make the form wider and longer so we have room to add panels to the form. Click on the Nintex Forms tab, click on Settings.

2. On the Settings menu, add 500 to the Canvas height and add 50 to the Canvas width.

3. So in this example the height went from 400 to 900 and the width went from 700 to 750. When you are done, click on the Save button.

4. Select the field you want to hide and all the fields below it, so the Status field and all the fields below it in this example. Tip: Click in the gray area to the left of the fields and drag across and down the form to select all the desired fields at one time.

5. When the fields are selected, drag the selected fields to the bottom of the form.

6. You should now have a blank area in your form above the field you want to hide.

7. Find the Panel form control, drag it onto your form into the blank area.

8. Resize the panel so it fits into the blank area. Make the panel wider than your fields, this will make the panel easy to select and view later on.

9. Select the field you want to hide and it’s label (again click and drag across and down)

10. Drag the highlighted field and it’s label into the panel. Make sure the panel is highlighted in blue which signifies you are placing the field and the label into the panel. There will be a little gap between the top of the panel and the top of your field, this is ok.

11. Resize the Panel so it’s about the same height as the label and field, there should be a small gap both above and below the field to ensure the entire field is inside the panel.

12. Highlight and select all the fields below the panel and drag them up beneath the panel. Again make sure there is a small gap beneath the panel. If you overlap the panel with the field or label below, that will cause a large gap when the field is hidden.

13. As a check, click on the right-hand side of the panel. This should highlight the panel, and any fields and labels that are inside the panel.

14. Double click on the field or panel you want to hide, in the Control settings under the Appearance section, change the Visible dropdown to Expression. Then click on the Insert reference icon to the right of the expression field.

15. On the insert reference screen, click on the Inline Functions tab. Double click on the IsMemberOfGroup function.

16. Double clicking will add the function to the ‘Dynamic text to insert’ text box at the bottom of the insert reference screen. In the brackets ( ) of the function, insert the name of the group you want the field to be visible to. In this example I inserted ‘Bridge Example Site Owners’ which is the name of the SharePoint group. Click OK when finished.

17. The Control Settings screen should now look similar to this. Click the Save button to save your new settings.

Finished Preview: If you are not in the Bridge Example Site Owners group, the Status field is hidden on the form:

Hiding from multiple groups

You can hide a panel from 2 groups, but that appears to be the limit.  To hide from 2 groups you need to use the OR inline function:

See the Troubleshooting isMemberOfGroup tutorial for more information.

White spaces or gaps in your form

 **If you discover that you have white space or gaps where your hidden panels or fields were, please see the Hidden fields leaving spaces in Nintex forms tutorial.

About Nick Hurst (85 Articles)
SharePoint and Nintex developer who strives to find easy to deploy and maintain solutions for business problems.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: