Recent

Nintex forms hiding fields using Rules

This article explains how to use Rules to hide fields based on a value in a field on the form (e.g. based on a dropdown value) or based on form properties (e.g. hiding a field in edit mode).

**If you want to hide fields based on the current users membership in a group please go to the Hide fields based on Group Membership tutorial as you can’t use Rules to check group membership.

Using Rules to hide a field or fields

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 hide the Status field when people are submitting new forms (but have it visible when editing or viewing a form) and only making the Urgent Justification field visible if someone selects Urgent from the Priority field.
Nintex-Forms-Hide-Rules-15-1

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.
Nintex-Forms-Hide-Rules-15-2

2. On the Settings menu, add 500 to the Canvas height and add 50 to the Canvas width.
Nintex-Forms-Hide-Rules-15-3

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.
Nintex-Forms-Hide-Rules-15-4

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.
Nintex-Forms-Hide-Rules-15-5

5. When the fields are selected, drag the selected fields to the bottom of the form.
Nintex-Forms-Hide-Rules-15-6

6. You should now have a blank area in your form above the field you want to hide.
Nintex-Forms-Hide-Rules-15-7

7. Find the Panel form control, drag it onto your form into the blank area.
Nintex-Forms-Hide-Rules-15-8

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.
Nintex-Forms-Hide-Rules-15-10

9. Select the field you want to hide and it’s label (again click and drag across and down)
Nintex-Forms-Hide-Rules-15-11

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.
Nintex-Forms-Hide-Rules-15-12

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.
Nintex-Forms-Hide-Rules-15-13

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.
Nintex-Forms-Hide-Rules-15-14

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.
Nintex-Forms-Hide-Membership-15-2

14. Now we are going to add a rule to the panel to hide it.
A. Click on the panel, that should highlight both the panel and any fields inside the panel.
B. Click on the Add Rule icon
Nintex-Forms-Hide-Rules-15-15

15. Enter a descriptive Name for the Rule, then click on the Insert Formula icon.
Nintex-Forms-Hide-Rules-15-16

16. For this rule we are going to hide the panel with the Status field in it for new form submissions, but still have it visible when editing or viewing the form.
A. Click on the Common tab
B. Click on the Is New Mode condition, the reference to the condition should appear down below in the Formula box.
C. Click on the OK button to save the formula
Nintex-Forms-Hide-Rules-15-17**For additional Formula examples, see the Nintex Forms Rule Formula Examples tutorial.

17. Click the Hide checkbox on the rule window. Your finished rule should look something like this.
Nintex-Forms-Hide-Rules-15-18

Optional: Hide additional fields on the form

For this example, we are also going to hide the Urgent Justification field unless the Priority equals Urgent.

I. Repeat steps 4 – 13 to put the additional field(s) in another panel. Once the panel has been created, populated, and the fields all organized.
A. Click on the panel so it’s highlighted
B. Click on the Add Rule button.
Nintex-Forms-Hide-Rules-15-19

II. Enter a descriptive Name for the Rule, then click on the Insert Formula icon. Both of my form rules are displayed since I clicked the ‘Show All’ checkbox under the rule box.
Nintex-Forms-Hide-Rules-15-20

III. For this example we are going to create a rule that hides the Urgent Justification panel unless Priority equals Urgent. We are not going to hide the panel when Priority equals Standard since then the panel would still be shown when the priority field was blank.
A. Click on the Named Controls tab to see the fields in the form.
B. Double click on the field you want to reference, Priority in this case.
C. In the Formula section, the red Priority field reference should appear.
Nintex-Forms-Hide-Rules-15-21

IV. After the Priority field reference, type: !=’Urgent’. Click Ok to save the formula.
The exclamation mark in front of the equals sign means not equals, and then put the value of the field inside of single quotes. So what this rule means, is Priority Not Equals Urgent.
Nintex-Forms-Hide-Rules-15-22**For additional Formula examples, see the Nintex Forms Rule Formula Examples tutorial

V. Click the Hide checkbox on the rule window. Your finished rule should look something like this.
Nintex-Forms-Hide-Rules-15-23

Preview your form to make sure your rules are working

After you have all your fields you want to hide into panels, and have added rules to the panels. You need to preview your form to make sure they work.

18. Bring up the preview panel and make sure you choose the correct Mode.
A. Click on the Nintex Forms tab
B. Click on the Preview icon
C. Choose the Mode of the form you want to preview, in this case New mode.
D. Click on the Generate Preview button.
Nintex-Forms-Hide-Rules-15-24

Finished Preview: Both the Status and Urgent Justification field are hidden on New form load.
Nintex-Forms-Hide-Rules-15-30

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 (84 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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: