Getting Memory Options To Work in Multiples of Two

Currently, our memory options in form.yml.rg is setup like this:

memory:
    widget: "number_field"
    max: 256
    min: 2
    step: 4
    value: 2
    label: "Memory (GB)"
    help: "Batch Job's Requested Maximum Memory Allocation"

Is there a way to get it to be something like 2, 4. 8, 16, 32, 64, 128, 256?

https://osc.github.io/ood-documentation/master/app-development/interactive/form.html

I see there’s an array option but the example is with strings. I’ll probably play around with options for numbers and whether that works but I’d appreciate any advice on what the bet way to do the setup I’m looking is.

Not easily. A quick search says you’d have to modify some javascript.

Basically this is an html5 feature that has little to do with OOD. Here’s how to do that, but I’d echo the original responder:

I would recommend that instead of overriding you watch the change event and then do whatever you want.