Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

conditionally hiding text

Avatar

Level 1

I am creating a form where in each section i would like to have "additional notes". however, if there are no additional notes, i would like it to be hidden, so the person reading/filling it out is not confused or believes the document is not completed. i know how to hide and show certain things but that is not necessarily what i want. it needs to be based on what the user wants when filling it out.

i was thinking if maybe i set it up so there was a check box next to it and if checked, the user can input the additional notes. if unchecked it will be hidden from the document when printed.

i was hoping someone would be able to help. thanks so much!

1 Reply

Avatar

Former Community Member

if (checkbox.rawValue == 0)

{

     yourText.presence="visible"

}

else

{

     yourText.presence="hidden" (or "invisible")

}