Global form items compatible with the dynamic auto fields

Thinking the answer here is no, but wanted to confirm…

Are global batch connect form items (global_) compatible with automatic predefined attribute fields (auto_)? The use-case here would be for attributes like label, help, display, and potentially dynamic JS options.

When trying I get an error below -

undefined method `auto_queues' for an instance of BootstrapForm::FormBuilder
Extracted source (around line #41):
     
                  render :partial => "batch_connect/session_contexts/file_attachments", :locals => { form: form, attrib: attrib, field_options: field_options }
                else
                  form.send widget, attrib.id, all_options
                end
                
    # Append a wrapper div to hold additional info

Relevant part of my ondemad.d/*.yml -

global_bc_form_items:
  global_auto_accounts:
    display: true
  global_auto_queues:
    widget: auto_queues
    display: true
    label: "Partition"

Related note (and possibly just a documentation issue) is that the predefined attributes (bc_) like bc_num_hours appear to work as globals despite not being listed as a form widget and seem to work with or without the widget key defined somehow (browser cache or maybe matched by name?) -

global_bc_num_hours:
    widget: bc_num_hours # seems to work with or without this defined
    label: "Number of hours"
    value: 4
    max: 48

You should not be specifying the widget here for auto_ related things, the fact that it allows you to seems to be a bug.

As to the bc_ note - I’m pretty sure that’s a 4.1 thing to be able to do that. I don’t think that’s supported in 4.0 - so I’d have to check to see what’s happening there.

Hm… so this should work? Because it just seems to appear as a plain text input box without the auto/dynamic functionality.

global_bc_form_items:
  global_auto_accounts:
    display: true
    label: "Account"
  global_auto_queues:
    display: true
    label: "Partition"

And in the app form…

form:
  - global_auto_accounts
  - global_auto_queues

I don’t think it should work in 4.0 because we had to add the support for bc_ related stuff in 4.1 specifically. Looks like we need to add support for auto_ related stuff too.