# Automatic attributes and dynamic form widgets

**URL:** <https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882>\
**Category:** Get Help\
**Tags:** question\
**Created:** [August 4, 2023, 1:04pm UTC](https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882 "2023-08-04T13:04:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghferrari](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/ghferrari/32/1064_2.png) [@ghferrari](https://discourse.openondemand.org/u/ghferrari)\
**Post date:** [August 4, 2023, 1:04pm UTC](https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882/1 "2023-08-04T13:04:45Z")

</div>

Hi Troy and others,

Many thanks for replying to my other recent posts and with apologies for bombarding you with questions!

Is there a way to use the [automatic form attributes](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/form.html#auto-bc-form-options) like `auto_queues` with the built-in [dynamic form widgets](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/dynamic-form-widgets.html)? I’d like to use e.g. `auto_queues` but also dynamically set form attributes depending on the queue that is chosen.

Many thanks,

Geoff

---

<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:** [August 4, 2023, 2:28pm UTC](https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882/2 "2023-08-04T14:28:49Z")

</div>

Unfortunately not. Though I did get a similar request around `auto_queues` recognizing which queue is a GPU queue so that it could toggle the visibility of another field (the # of gpus you want).

> <https://github.com/OSC/ondemand/issues/2924>
>
> \`auto\_queues\` should also interact with a \`auto\_gpu\` field in this way:
> 
> \* \`au…to\_queues\` could recognize when a queue (partition) is a GPU partition
> \* if it is, it could show a \`auto\_gpu\` field. 
> \* The \`auto\_gpu\` field is a number with the min being 1 and the max being the max GRES for GPUs that's available.
> \* the auto\_queues field can then add \`data-hide\` attributes to the GPU queues such that certian options (gpu queues) will hide or show \`auto\_gpus\`.

Can you describe the use case you’re thinking of, maybe there’s something similar we can do?

---

<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:** [August 4, 2023, 2:29pm UTC](https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882/3 "2023-08-04T14:29:48Z")

</div>

> [@ghferrari](#):
>
> Many thanks for replying to my other recent posts and with apologies for bombarding you with questions!

No problem at all! And don’t worry about questions, the NSF pays us to answer questions as well as write code, so, no issues at all with asking questions!

---

<div class="post-metadata">

**Author:** ![ghferrari](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/ghferrari/32/1064_2.png) [@ghferrari](https://discourse.openondemand.org/u/ghferrari)\
**Post date:** [August 16, 2023, 2:52pm UTC](https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882/4 "2023-08-16T14:52:34Z")

</div>

Many thanks, @jeff.ohrstrom .

The use case I’m thinking of is the basic one I’ve described:

> I’d like to use e.g. `auto_queues` but also dynamically set form attributes depending on the queue that is chosen

Imagine I manually set a list of queues. Then I could use dynamic form widgets to customise the rest of the form depending on which queue was selected. Well, I’d like to use `auto_queues` but still be able to customise the form dynamically based on which queue the user selects, but I don’t see a way of doing it since there’s nowhere to specify the dynamic information - normally this would go into my definition of the queues, if I’m doing it manually.

---

<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:** [February 12, 2024, 2:52pm UTC](https://discourse.openondemand.org/t/automatic-attributes-and-dynamic-form-widgets/2882/5 "2024-02-12T14:52:58Z")

</div>

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