# Issue with Dynamic Form Widgets

**URL:** <https://discourse.openondemand.org/t/issue-with-dynamic-form-widgets/2192>\
**Category:** Get Help\
**Tags:** question\
**Created:** [July 18, 2022, 2:38pm UTC](https://discourse.openondemand.org/t/issue-with-dynamic-form-widgets/2192 "2022-07-18T14:38:57Z")\
**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:** [July 18, 2022, 2:38pm UTC](https://discourse.openondemand.org/t/issue-with-dynamic-form-widgets/2192/1 "2022-07-18T14:38:57Z")

</div>

Hello all,

I use Dynamic Form Widgets function in ondemand-2.0.27 as following,

> attributes:  
> node\_type:  
> widget: select  
> options:  
> - [‘queue1’, ‘queue1’, data-max-bc-num-hours: 3, data-max-num-cores: 3]  
> - [‘queue2’, ‘queue2’, data-max-bc-num-hours: 1, data-max-num-cores: 1]  
> bc\_num\_hours:  
> widget: “number\_field”  
> value: 1  
> min: 1  
> max: 3  
> num\_cores:  
> widget: “number\_field”  
> value: 1  
> min: 1  
> max: 3  
> form:
> 
> - node\_type
> - bc\_num\_hours
> - num\_cores

Even though the maximum bc-num-hours in queue2 is set to 1, I can select up to 3 in the form. There is no problem with num-cores.  
Also, when I deleted one of the two data-max-XXX in the node\_type options, it worked as expected.

Maybe I can’t set two data-max-XXX in the node\_type options ?

---

<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:** [July 19, 2022, 4:40pm UTC](https://discourse.openondemand.org/t/issue-with-dynamic-form-widgets/2192/2 "2022-07-19T16:40:36Z")

</div>

Apologies, I think you’re hitting this bug where mins and maxes only work for 1 thing.

> <https://github.com/OSC/ondemand/issues/2115>
>
> If I had something like this, where I wanted to toggle the max \`memory\` and \`nod…es\` (to other fields from this one), it doesn't currently work, only changing \`memory\`. Which is to say, we can't change 2 things at once, at least for the min & max handlers.
> 
> \`\`\`
> options:
> - \[
> "Compute", "compute"
> \]
> - \[
> "Debug", "debug",
> data-max-memory: 200,
> data-max-nodes: 3,
> \]
> \`\`\`
> 
> ┆Issue is synchronized with this \[Asana task\](https://app.asana.com/0/1201735133575781/1202553806524164) by \[Unito\](https://www.unito.io)

---

<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:** [January 15, 2023, 4:41pm UTC](https://discourse.openondemand.org/t/issue-with-dynamic-form-widgets/2192/3 "2023-01-15T16:41:02Z")

</div>

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