Showing or hiding fields on a form

  • 21 March 2017
  • 9 replies
  • 76 views

Badge +3

I have a Nintex form that contains a choice field with several pull-down choice available to the user. There are a number of labels and multi-line text fields that need to be selectively hidden depending on the choice of the pull-down list. The choice field is called "Award Type" and the choices include Gift certificate, Check, Tickets, for example. If Check is selected for example, I need to hide the labels and fields that do not pertain to the field that is filled out with the justification for awarding a check. I have tried the "If" and "contains" Runtime Functions but haven't managed to get either configured so that they would work. Any suggestions??

Thanks,

Bill


9 replies

Badge +8

You need to put fields into panels and hide the panels with rules based on your conditions. When you search the community site for this kind of information, you will find the information you need.

Badge +3

Thanks for your quick response Rick. I should have stated that the fields/controls are in panels. I have done some searching already but haven't found a solution that works - so far anyway. I will continue to look for a way to do what I need to do. Again, thanks!

Bill

Userlevel 5
Badge +13

Hey Bill,

When you put everything in the panel, you then need to add a rule to the panel. The rule should look something like

Award Type != "Gift certificate"  and then check the "Hide" box

201030_pastedImage_1.png

Basically, when the logic evaluates to "True," the panel will be hidden. Make sure when you're making your rule that you pick Award Type from the "Named Controls" not the "Item Properties" one!

201031_pastedImage_2.png

Item properties are actual field values which aren't written until the form is submitted. Named Control values are updated on click.

Let me know if you need more help!

Badge +8

Make sure the fields are really IN the panels. Also, the rules (formatting) must be applied on the panels you want to hide/unhide. This post should be helpful. You probably have difficulties with the rule logic. First try something easy, making sure the hide/unhide works. Then expand the rule logic.

Badge +3

This is working great – for one condition. The situation I have is that two of four conditions need to show the controls/fields in the panel. Is there a way to do that with one rule, or do I need to create a second panel with the identical controls/fields contained?

I did now have everything in a panel – once I did that, the relationship to hide or show the controls worked fine. Thank you – very much.

Bill

Badge +3

I tried the duplicate panel approach – works like a charm. Thanks so much for heading me in the right direction..

Bill

Userlevel 5
Badge +13

Hey Bill,

Instead of a duplicate panel, you could have multiple conditions on one (there are "and" and "or" operators within that formula builder). So you could have something like

Award Type = "Gift Certificate" && Other Field != "someOtherValue"

If you post some additional info or screenshots I could help you through that if you'd like? It's more concise to have one rule handle all of your stuff on one panel. Also, if you really want, you can apply multiple rules to one panel as well.

Badge +3

Yes – figured that out right after my last email to you. Again, thanks!

Bill

Badge +1

Hi Courtney - curious - how can i do a when statement if i want the field to appear in all but 3 of 6 total choices avail? So let's say the main field choice is called "Type of Fruit" and there were 6 options.  Apple, Banana, Strawberry, Grapes, Oranges, Papaya. I want a field "Seedless/Seeded" to appear if they chose Apple, Grapes, Oranges.  How do i get it smart enough to know that if Banana or Strawberry or Papaya was chosen, do not display the field. But if Apple, Grapes and Oranges were chosen, display the field.

Reply