diff --git a/netbox/dcim/forms/bulk_edit.py b/netbox/dcim/forms/bulk_edit.py
index 2316b3ef7..79ecc8383 100644
--- a/netbox/dcim/forms/bulk_edit.py
+++ b/netbox/dcim/forms/bulk_edit.py
@@ -557,7 +557,7 @@ class DeviceBulkEditForm(NetBoxModelBulkEditForm):
label=_('Device type'),
queryset=DeviceType.objects.all(),
required=False,
- option_attrs={
+ context={
'parent': 'manufacturer',
},
query_params={
@@ -644,7 +644,7 @@ class ModuleBulkEditForm(NetBoxModelBulkEditForm):
query_params={
'manufacturer_id': '$manufacturer'
},
- option_attrs={
+ context={
'parent': 'manufacturer',
}
)
diff --git a/netbox/dcim/forms/connections.py b/netbox/dcim/forms/connections.py
index a7e59fa34..67ef360fe 100644
--- a/netbox/dcim/forms/connections.py
+++ b/netbox/dcim/forms/connections.py
@@ -30,7 +30,7 @@ def get_cable_form(a_type, b_type):
attrs[f'{cable_end}_terminations'] = DynamicModelMultipleChoiceField(
queryset=term_cls.objects.all(),
label=term_cls._meta.verbose_name.title(),
- option_attrs={
+ context={
'disabled': '_occupied',
},
query_params={
@@ -54,7 +54,7 @@ def get_cable_form(a_type, b_type):
attrs[f'{cable_end}_terminations'] = DynamicModelMultipleChoiceField(
queryset=term_cls.objects.all(),
label=_('Power Feed'),
- option_attrs={
+ context={
'disabled': '_occupied',
},
query_params={
@@ -76,7 +76,7 @@ def get_cable_form(a_type, b_type):
attrs[f'{cable_end}_terminations'] = DynamicModelMultipleChoiceField(
queryset=term_cls.objects.all(),
label=_('Side'),
- option_attrs={
+ context={
'disabled': '_occupied',
},
query_params={
diff --git a/netbox/dcim/forms/model_forms.py b/netbox/dcim/forms/model_forms.py
index 0908f0925..a46136775 100644
--- a/netbox/dcim/forms/model_forms.py
+++ b/netbox/dcim/forms/model_forms.py
@@ -434,7 +434,7 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
device_type = DynamicModelChoiceField(
label=_('Device type'),
queryset=DeviceType.objects.all(),
- option_attrs={
+ context={
'parent': 'manufacturer',
},
selector=True
@@ -464,7 +464,7 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
label=_('Virtual chassis'),
queryset=VirtualChassis.objects.all(),
required=False,
- option_attrs={
+ context={
'parent': 'master',
},
selector=True
@@ -574,7 +574,7 @@ class ModuleForm(ModuleCommonForm, NetBoxModelForm):
module_type = DynamicModelChoiceField(
label=_('Module type'),
queryset=ModuleType.objects.all(),
- option_attrs={
+ context={
'parent': 'manufacturer',
},
selector=True
@@ -784,7 +784,7 @@ class ComponentTemplateForm(forms.ModelForm):
device_type = DynamicModelChoiceField(
label=_('Device type'),
queryset=DeviceType.objects.all(),
- option_attrs={
+ context={
'parent': 'manufacturer',
}
)
@@ -802,7 +802,7 @@ class ModularComponentTemplateForm(ComponentTemplateForm):
label=_('Device type'),
queryset=DeviceType.objects.all().all(),
required=False,
- option_attrs={
+ context={
'parent': 'manufacturer',
}
)
@@ -810,7 +810,7 @@ class ModularComponentTemplateForm(ComponentTemplateForm):
label=_('Module type'),
queryset=ModuleType.objects.all(),
required=False,
- option_attrs={
+ context={
'parent': 'manufacturer',
}
)
diff --git a/netbox/ipam/forms/model_forms.py b/netbox/ipam/forms/model_forms.py
index 6a1a7ab2f..892378179 100644
--- a/netbox/ipam/forms/model_forms.py
+++ b/netbox/ipam/forms/model_forms.py
@@ -269,7 +269,7 @@ class IPAddressForm(TenancyForm, NetBoxModelForm):
interface = DynamicModelChoiceField(
queryset=Interface.objects.all(),
required=False,
- option_attrs={
+ context={
'parent': 'device',
},
selector=True,
@@ -278,7 +278,7 @@ class IPAddressForm(TenancyForm, NetBoxModelForm):
vminterface = DynamicModelChoiceField(
queryset=VMInterface.objects.all(),
required=False,
- option_attrs={
+ context={
'parent': 'virtual_machine',
},
selector=True,
diff --git a/netbox/utilities/forms/fields/dynamic.py b/netbox/utilities/forms/fields/dynamic.py
index f243f3a3a..3cd956694 100644
--- a/netbox/utilities/forms/fields/dynamic.py
+++ b/netbox/utilities/forms/fields/dynamic.py
@@ -63,8 +63,8 @@ class DynamicModelChoiceMixin:
initial_params: A dictionary of child field references to use for selecting a parent field's initial value
null_option: The string used to represent a null selection (if any)
disabled_indicator: The name of the field which, if populated, will disable selection of the
- choice (DEPRECATED: pass `option_attrs={'disabled': '$fieldname'}` instead)
- option_attrs: A mapping of