# Help with data-hide

**URL:** <https://discourse.openondemand.org/t/help-with-data-hide/4501>\
**Category:** Get Help\
**Created:** [September 2, 2025, 3:08pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501 "2025-09-02T15:08:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsonoda](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/nsonoda/32/1575_2.png) [@nsonoda](https://discourse.openondemand.org/u/nsonoda)\
**Post date:** [September 2, 2025, 3:08pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/1 "2025-09-02T15:08:44Z")

</div>

Hi!

I have a question regarding the operation of data-hide. My form.yml is configured as follows:

```yaml
---
attributes:
  bc_dynamic_js: true
  desktop: "xfce"
  bc_vnc_idle: 0
  bc_vnc_resolution:
    required: true
  node_type: null
  bc_num_slots: 2
  num_cores:
    widget: "number_field"
    label: "Number of cores"
    value: 2
  memory:
    label: "Memory"
    value: "1GB"
  node:
    widget: "select"
    label: "Node"
    options:
      - ["gn01", "gn01"]
      - ["gn02", "gn02"]
      - ["gn03", "gn03"]
      - ["n01", "n01", data-hide-gpu: true, data-set-gpu: 'gpu:0']
    cacheable: false
  gpu:
    label: "GPU"
    value: "gpu:0"
    help: "Format: \"gpu:N\" where N is the number of GPUs requested. Use \"gpu:0\" for none (default)."
    cacheable: false
form:
  - bc_vnc_idle
  - desktop
  - node
  - memory
  - gpu
  - auto_queues
  - bc_num_hours
  - num_cores
  - bc_num_slots
  - bc_vnc_resolution
  - bc_email_on_started

```

And the submit.yml.erb:

```yaml
---
batch_connect:
  template: vnc
script:
  native:
    - "-c"
    - "<%= num_cores %>"
    - "-w"
    - "<%= node %>"
    - "--mem"
    - "<%= memory %>"
    - "--gres"
    - "<%= gpu %>"

```

Where, in case the selected node is n01, the GPU selection option should be hidden. However, even when selecting node n01, the GPU option is still visible.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/d/d686e9aace972cded5731cf89f9a93eb7743d561.png)

For context, I am using OOD version 4.0.3.

Could you assist me with tips or suggestions for this situation?

Thanks!  
Nícolas

---

<div class="post-metadata">

**Author:** ![jose-d](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jose-d/32/703_2.png) [@jose-d](https://discourse.openondemand.org/u/jose-d)\
**Post date:** [September 2, 2025, 3:18pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/2 "2025-09-02T15:18:07Z")

</div>

I’m interested into this too. Instead of node I’d have good use for it when no-gpu partition is selected. For now I do it with fixed slots eg. for given amount of CPUs you get one GPU..

---

<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:** [September 2, 2025, 3:20pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/3 "2025-09-02T15:20:25Z")

</div>

> [@nsonoda](#):
>
> `bc_dynamic_js: true`

This is not a part of the form. It’s a global setting you set in a YML file in the `/etc/ood/config/ondemand.d` directory.

When I load this file it appears to work as expected.

@jose-d can you share an example form.yml you’re trying to get working?

---

<div class="post-metadata">

**Author:** ![jose-d](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jose-d/32/703_2.png) [@jose-d](https://discourse.openondemand.org/u/jose-d)\
**Post date:** [September 2, 2025, 3:23pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/4 "2025-09-02T15:23:15Z")

</div>

sure, this is the one we use now: [OOD-Jupyterhub-in-UV-python-environment/form.yml.erb at master · jose-d/OOD-Jupyterhub-in-UV-python-environment · GitHub](https://github.com/jose-d/OOD-Jupyterhub-in-UV-python-environment/blob/master/form.yml.erb) . and EDIT: @jeff.ohrstrom I think the snippet above answered my question, I had no idea about this mechanism. I’ll try that, thanks.

---

<div class="post-metadata">

**Author:** ![nsonoda](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/nsonoda/32/1575_2.png) [@nsonoda](https://discourse.openondemand.org/u/nsonoda)\
**Post date:** [September 2, 2025, 3:42pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/5 "2025-09-02T15:42:45Z")

</div>

Hi Jose and Jeff!

Thank you for the replies.

@jeff.ohrstrom, I removed the line `bc_dynamic_js: true` from my form.yml and the data-hide worked successfully, thank you so much!

Note: I had created a file dynamic.yml inside `/etc/ood/config/ondemand.d` with `bc_dynamic_js: true`, but adding this line to the form.yml turned out to be the problem.

Thanks!  
Nícolas

---

<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:** [September 2, 2025, 3:44pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/6 "2025-09-02T15:44:43Z")

</div>

Glad to hear it all worked out. Just for completeness, here’s the documentation for dynamic form widgets like this.

> **[Dynamic Form Widgets — Open OnDemand 4.0.0 documentation](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/dynamic-form-widgets.html)**

---

<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:** [March 1, 2026, 3:44pm UTC](https://discourse.openondemand.org/t/help-with-data-hide/4501/7 "2026-03-01T15:44:54Z")

</div>

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