Skip to main content
Participant
February 18, 2025
Answered

Looking for a way to hind part of a document

  • February 18, 2025
  • 1 reply
  • 103 views

I have two parts of a checklists on one page. But based on what you choose in a dropdown depends on what part you need to companete. There are a few text fields and also some check boxes. I have not been able to come up with a way to hide the other section becuase it does not pertain to the item you chose in the dropdown. Is there a way to do this? 

Correct answer Nesa Nurani

You can hide a field by changing display property, here is an example script to show two fields if dropdown choice is "Choice1" otherwise they are hidden, script should be placed in dropdown field under calculate tab as custom calculation script:

if(event.value == "Choice1"){
 this.getField("Text1").display = display.visible;
 this.getField("Check Box1").display = display.visible;}
else{
 this.getField("Text1").display = display.hidden;
 this.getField("Check Box1").display = display.hidden;}

You will have to change "Choice1" to your actual choice in dropdown, and field names to your actual field names you wish to show/hide, add more fields between curly brackets.

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
February 18, 2025

You can hide a field by changing display property, here is an example script to show two fields if dropdown choice is "Choice1" otherwise they are hidden, script should be placed in dropdown field under calculate tab as custom calculation script:

if(event.value == "Choice1"){
 this.getField("Text1").display = display.visible;
 this.getField("Check Box1").display = display.visible;}
else{
 this.getField("Text1").display = display.hidden;
 this.getField("Check Box1").display = display.hidden;}

You will have to change "Choice1" to your actual choice in dropdown, and field names to your actual field names you wish to show/hide, add more fields between curly brackets.