I’ve been trying to hide a form field element based on the value of a select dropdown form field following the documentation but just don’t seem to be able to make it work. I am using ondemand-4.0.6-1.el9.x86_64.
I have enabled them in my /etc/ood/config/ondemand.d/config.yml file with
...
bc_dynamic_js: true
..
and added the data-hide-… entries to my selection widget in my /etc/ood/config/apps/bc_desktop for yaml file
...
attributes:
...
sn_gpu:
widget: select
label: GPU
display: true
options:
- [ "None", "", data-hide-sn-virtualgl: true ]
- [ "h100_1.10 (10GB)", "h100_1.10:1", data-hide-sn-virtualgl: true ]
- [ "h100_2.20 (20GB)", "h100_2.20:1", data-hide-sn-virtualgl: true ]
- [ "h100_3.40 (40GB)", "h100_3.40:1", data-hide-sn-virtualgl: true ]
- [ "h100 (80GB)", "h100:1" ]
sn_virtualgl:
widget: "check_box"
label: "Enable VirtualGL (if hardware OpenGL required)"
checked_value: "yes"
unchecked_value: "no"
...
attributes:
desktop: "mate"
sn_time:
widget: "number_field"
label: "Hours"
value: 4
min: 1
max: 8
step: 1
sn_mem:
widget: "number_field"
label: "Memory (GB)"
value: 8
min: 4
max: 6000
step: 1
sn_cores:
widget: "number_field"
label: "Cores (>12GB/core means longer large-memory queue times)"
value: 2
min: 1
max: 192
sn_gpu:
widget: select
label: GPU
display: true
options:
- [ "None", "", data-hide-sn-virtualgl: true ]
- [ "h100_1.10 (10GB)", "h100_1.10:1", data-hide-sn-virtualgl: true ]
- [ "h100_2.20 (20GB)", "h100_2.20:1", data-hide-sn-virtualgl: true ]
- [ "h100_3.40 (40GB)", "h100_3.40:1", data-hide-sn-virtualgl: true ]
- [ "h100 (80GB)", "h100:1" ]
sn_virtualgl:
widget: "check_box"
label: "Enable VirtualGL (if hardware OpenGL required)"
checked_value: "yes"
unchecked_value: "no"
form:
...
- sn_gpu
- sn_virtualgl
...
...
Even after doing a restart web sever from the develop menu, the sn_virtualgl check box remains shown for all sn_gpu selections as seen in this screenshot.
I know it is seeing my changes as any changes I make to the wording are showing up. Likewise I know it is reading my config entry as if I set the menu bar colour by adding add a brand_bg_color setting that works.
Here is a screenshot of what the Firefox inspector shows for the associated form items
I tried to look at and poke around on the javascript side as well, but it was unreadable minified code that I wasn’t able to work with in any meaningful way, and I couldn’t figure out how to turn off the minification.

