# Possibility of hiding components (other than buttons)

**URL:** <https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109>\
**Category:** Questions\
**Created:** [June 27, 2018, 6:59am UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109 "2018-06-27T06:59:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [June 27, 2018, 6:59am UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/1 "2018-06-27T06:59:54Z")

</div>

Is there a way of hiding components using CL? At the moment there is a `hidden` sink for buttons but I can’t see it for any other components.

The use case I have in mind is if I want to send a student back to a previous screen to correct something, I can change the content of the note to instruct them and I can hide buttons but I can’t hide other components on the page (as far as I can tell.)

I would like to be able to have the screen just consist of that note if the user is required to go back and fix something. (Although I would also be happy for a completely different solution to this problem, like disabling the “forward” button if a user has a significant problem on the current screen.)

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [June 27, 2018, 3:51pm UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/2 "2018-06-27T15:51:07Z")

</div>

You can’t hide the whole component but you can do something like this: [http://www.mrchowmath.com/blog/the-people-demand-screen-locks](http://www.mrchowmath.com/blog/the-people-demand-screen-locks)

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [June 27, 2018, 10:20pm UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/3 "2018-06-27T22:20:00Z")

</div>

Thoughts on hiding multiple choice or inputs?

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [June 27, 2018, 10:38pm UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/4 "2018-06-27T22:38:16Z")

</div>

Yup. I disable the submit Button, change the button text, and control the choice text in CL to be blank.

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [June 28, 2018, 9:58am UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/5 "2018-06-28T09:58:40Z")

</div>

Ok. I’m still looking for something a bit more elegant (like the equivalent of the hidden sink) but it sounds like this is the best workaround for now. Thanks.

---

<div class="post-metadata">

**Author:** ![kristynw](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@kristynw](https://cl.desmos.com/u/kristynw)\
**Post date:** [June 28, 2018, 4:38pm UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/6 "2018-06-28T16:38:36Z")

</div>

What would this look like with typing code? I am new to computation layer and I want to hide a multiple choice question until they complete a question on a previous page.

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [June 28, 2018, 4:53pm UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/7 "2018-06-28T16:53:28Z")

</div>

Use the choiceContent sink and set it to “” before the last question is answered.

---

<div class="post-metadata">

**Author:** ![kristynw](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@kristynw](https://cl.desmos.com/u/kristynw)\
**Post date:** [June 29, 2018, 4:13am UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/8 "2018-06-29T04:13:13Z")

</div>

I am having difficulty getting it to work. Here is what I have in the code of my multiple choice “whatcolor” (3 options). The previous page has a question (game1choice1) that they need to answer. If they do not answer it, I don’t want the question “whatcolor” to show up on the next page. Is there a way you can help me with this?  
thanks!

when game1choice1.isSelected(1) or game1choice1.isSelected(2) or game1choice1.isSelected(3) whatcolor.isSelected(1) = “red”

when game1choice1.isSelected(1) or game1choice1.isSelected(2) or game1choice1.isSelected(3) whatcolor.isSelected(2) = “blue”

when game1choice1.isSelected(1) or game1choice1.isSelected(2) or game1choice1.isSelected(3) whatcolor.isSelected(3) = “green”

```
otherwise ChoiceContent(1,2,3)=""
```

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [June 29, 2018, 4:22am UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/9 "2018-06-29T04:22:26Z")

</div>

Like @Bryn noted its not very elegant and you will see one blank choice but this is the best way now to hide the choices:

```auto
N=when game1choice1.isSelected(1) or game1choice1.isSelected(2) or game1choice1.isSelected(3) 1
otherwise 0
choiceContent(1):when N=1 "Red"
otherwise ""

choiceContent(2):when N=1 "Blue"
otherwise ""

choiceContent(3):when N=1 "Green"
otherwise ""

```

Another option is setting each choice to say something like “Go back and make a selection first” or something like that.

---

<div class="post-metadata">

**Author:** ![kristynw](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@kristynw](https://cl.desmos.com/u/kristynw)\
**Post date:** [June 29, 2018, 4:40am UTC](https://cl.desmos.com/t/possibility-of-hiding-components-other-than-buttons/109/10 "2018-06-29T04:40:22Z")

</div>

Thank you! I appreciate it!
