Allow plugins to extend core forms #7748

Closed
opened 2025-12-29 20:27:47 +01:00 by adam · 1 comment
Owner

Originally created by @peteeckel on GitHub (Mar 12, 2023).

NetBox version

3.4.5

Feature type

New functionality

Proposed functionality

Starting with NetBox 3.4, plugins have been allowed to modify core views by adding tabs or panels, which is a very welcome enhancement.

I suggest allowing a plugin to add fields to core forms as well, or (maybe this needs a separate request) even remove or modify fields in core forms.

Use case

I am contributing to the NetBox DNS plugin, which manages DNS data in NetBox.

A feature that is often requested is a closer integration with IPAM, by creating a connection between IP addresses and NetBox DNS A/AAAA and/or PTR records. In some discussions I had it turned out that the major challenge with this is to create the link between an IP address and the corresponding DNS records.

This would be solvable in a very elegant way if it were possible to select a view/zone/record from the plugin's data model when creating an IP address, thereby either creating the DNS record on-the-fly or just creating a link to an existing DNS record (in pretty much the same way as Device/VM interfaces connect with IP addresses).

The implementation could then be along the lines of registering an extension form belonging to the plugin with the core form (just like plugin tabs can be registered with views), so the plugin fields can be filled in when an IP address is created or edited.

Ideally it would then also be able to automatically populate the dns_name field in the IPAddress model from the assigned NetBox DNS address record, so it would be an interesting additional feature to set that field to non-editable or hide it when NetBox DNS handles the address/name correlation.

Being able to provide a closer integration would also reduce the possibility of errors and the remove the need of entering the same data twice when new IP addresses are added and DNS records need to be created for them.

Database changes

None (in the core model)

External dependencies

None

Originally created by @peteeckel on GitHub (Mar 12, 2023). ### NetBox version 3.4.5 ### Feature type New functionality ### Proposed functionality Starting with NetBox 3.4, plugins have been allowed to modify core views by adding tabs or panels, which is a very welcome enhancement. I suggest allowing a plugin to add fields to core forms as well, or (maybe this needs a separate request) even remove or modify fields in core forms. ### Use case I am contributing to the NetBox DNS plugin, which manages DNS data in NetBox. A feature that is often requested is a closer integration with IPAM, by creating a connection between IP addresses and NetBox DNS A/AAAA and/or PTR records. In some discussions I had it turned out that the major challenge with this is to create the link between an IP address and the corresponding DNS records. This would be solvable in a very elegant way if it were possible to select a view/zone/record from the plugin's data model when creating an IP address, thereby either creating the DNS record on-the-fly or just creating a link to an existing DNS record (in pretty much the same way as Device/VM interfaces connect with IP addresses). The implementation could then be along the lines of registering an extension form belonging to the plugin with the core form (just like plugin tabs can be registered with views), so the plugin fields can be filled in when an IP address is created or edited. Ideally it would then also be able to automatically populate the `dns_name` field in the IPAddress model from the assigned NetBox DNS address record, so it would be an interesting additional feature to set that field to non-editable or hide it when NetBox DNS handles the address/name correlation. Being able to provide a closer integration would also reduce the possibility of errors and the remove the need of entering the same data twice when new IP addresses are added and DNS records need to be created for them. ### Database changes None (in the core model) ### External dependencies None
adam added the type: feature label 2025-12-29 20:27:47 +01:00
adam closed this issue 2025-12-29 20:27:47 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 16, 2023):

It's an interesting idea, but I'm afraid this isn't something we can reasonably support. It would impose a huge burden on core development, and there's no way we could reasonably ensure the integrity of a form that could be extended arbitrarily by an outside party.

@jeremystretch commented on GitHub (Mar 16, 2023): It's an interesting idea, but I'm afraid this isn't something we can reasonably support. It would impose a huge burden on core development, and there's no way we could reasonably ensure the integrity of a form that could be extended arbitrarily by an outside party.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7748