# About the operation of data-hide

**URL:** <https://discourse.openondemand.org/t/about-the-operation-of-data-hide/3051>\
**Category:** Get Help\
**Created:** [October 26, 2023, 2:05am UTC](https://discourse.openondemand.org/t/about-the-operation-of-data-hide/3051 "2023-10-26T02:05:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [October 26, 2023, 2:05am UTC](https://discourse.openondemand.org/t/about-the-operation-of-data-hide/3051/1 "2023-10-26T02:05:38Z")

</div>

Hi,

I have a question about how data-hide works. It is difficult to explain in text, so I will use pictures to explain it.

```auto
form:
  - queue
  - gpus
  - opengl
attributes:
  queue:
    widget: select
    options:
      - ["normal node", "normal", data-hide-gpus: true, data-hide-opengl: true]
      - ["gpu node", "gpu"]
  gpus:
    widget: select
    value: "0"
    options:
      - ["0", "0", data-hide-opengl: true]
      - ["1", "1"]
      - ["2", "2"]
  opengl:
    widget: check_box

```

The screen visited for the web form generated by the above form.yml is shown below.

 ![p1](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/7/7cfa59a407bfc0e31a0de635d42466eb99d04261.png)

Next, select “gpu node” from Queue and you will be taken to the below screen.

 ![p2](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/c/c88332b7ebdc62ac836ee10d7684d7f4124ca457.png)

Here, you can see the OpenGL checkbox.  
Is it possible to hide this checkbox using the above flow ?  
Of cause, when you select “1” from Gpus and then select “0” again, the OpenGL checkbox will disappear. But I want it to be invisible from the beginning.

Best,

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [October 26, 2023, 7:25pm UTC](https://discourse.openondemand.org/t/about-the-operation-of-data-hide/3051/2 "2023-10-26T19:25:12Z")

</div>

So when I copied this I had the behavior that you’d expect. This makes me think that you’ve launched this application in the past with `gpus` set to 1 or more and this value is being cached.

So what you’re seeing when the page loads is the fact that `gpus` is not the defualt 0 that you’ve provided, but instead the cached value of 1 or 2.

You can disable caching by setting `cacheable` attribute to false. This way the starting value of `gpus` will always be 0 as you’ve set it there. (hacking around I had to set it on both queue and gpus, so you may have to play around a bit with it).

```yaml
  gpus:
    widget: select
    value: "0"
    options:
      - ["0", "0", data-hide-opengl: true]
      - ["1", "1"]
      - ["2", "2"]
   cacheable: false

```

By the way - you probably also want a `data-set-gpus=0` attached to the normal node option. Unfortunately, we don’t have a lot of support for checkboxes at this time so there’s no way to reset that value.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [April 23, 2024, 7:25pm UTC](https://discourse.openondemand.org/t/about-the-operation-of-data-hide/3051/3 "2024-04-23T19:25:45Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
