# Dynamic form values

**URL:** <https://discourse.openondemand.org/t/dynamic-form-values/2607>\
**Category:** Get Help\
**Tags:** question\
**Created:** [April 7, 2023, 5:09pm UTC](https://discourse.openondemand.org/t/dynamic-form-values/2607 "2023-04-07T17:09:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [April 7, 2023, 5:09pm UTC](https://discourse.openondemand.org/t/dynamic-form-values/2607/1 "2023-04-07T17:09:45Z")

</div>

Hey guys,  
Is there a decent example of how to change input values in forms based on selection? For example, If I select Partion: gpupriority or gputest, I’d like to change “GPUs requested” to 1 (minimum value=1). If I select Partition: priority (cpus only), I’d like to set “GPUs requested” to 0 and make it unchangeable.  
Another example is if I select Partition: priority I’d like to only offer priority accounts assigned to the user (some users are in multiple groups).

Does that make sense?

Kenny

---

<div class="post-metadata">

**Author:** ![gbyrket](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gbyrket/32/894_2.png) [@gbyrket](https://discourse.openondemand.org/u/gbyrket)\
**Post date:** [April 7, 2023, 5:22pm UTC](https://discourse.openondemand.org/t/dynamic-form-values/2607/2 "2023-04-07T17:22:09Z")

</div>

Hi Kenny.

Here are the docs for the Dynamic form widget. Please let us know if you need additional help.

[https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/dynamic-form-widgets.html](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/dynamic-form-widgets.html)

thanks,  
-gerald

---

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [April 10, 2023, 2:10pm UTC](https://discourse.openondemand.org/t/dynamic-form-values/2607/3 "2023-04-10T14:10:44Z")

</div>

Oooooh 😛 thanks Gerald!

Kenny

---

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [April 17, 2023, 10:47pm UTC](https://discourse.openondemand.org/t/dynamic-form-values/2607/4 "2023-04-17T22:47:33Z")

</div>

I found an error in your documentation. Pretty sure the Default should be set to false. [LINK](https://osc.github.io/ood-documentation/latest/reference/files/ondemand-d-ymls.html#bc-dynamic-js)

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

---

<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:** [October 14, 2023, 10:48pm UTC](https://discourse.openondemand.org/t/dynamic-form-values/2607/5 "2023-10-14T22:48:12Z")

</div>

Closed on October 14, 2023, 10:48pm UTC

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