Add ability to define custom quick_add views #11531

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

Originally created by @tom0010 on GitHub (Aug 26, 2025).

NetBox version

v4.3.5

Feature type

Change to existing functionality

Proposed functionality

When building a plugin, if you define quick_add=True it uses the queryset.model, therefore you cannot predefine a custom view for plugin purposes and better UX.
Seen here: 0870ec6eb8/netbox/utilities/forms/fields/dynamic.py (L176)

Use case

When building a plugin, if I want to quick add a prefix for example, there are a lot extra attributes that I don't want my end users to see, nor do they need them. It would be good if I could customise the quick_add view.
For example, to have the option for the users to just add the prefix and the tenant without anything extra as the rest is optional anyway, and for my plugin I don't need the extra attributes.

From a plugin point of view, it would be good if we could point the quick_add view to a specific view, so we can subclass some of the core models for better customisation.

Database changes

N/A, just extending the current functionality of quick_add.

External dependencies

No response

Originally created by @tom0010 on GitHub (Aug 26, 2025). ### NetBox version v4.3.5 ### Feature type Change to existing functionality ### Proposed functionality When building a plugin, if you define `quick_add=True` it uses the `queryset.model`, therefore you cannot predefine a custom view for plugin purposes and better UX. Seen here: https://github.com/netbox-community/netbox/blob/0870ec6eb8ec20be5045be5976c0c4f1bd4b37df/netbox/utilities/forms/fields/dynamic.py#L176 ### Use case When building a plugin, if I want to quick add a prefix for example, there are a lot extra attributes that I don't want my end users to see, nor do they need them. It would be good if I could customise the quick_add view. For example, to have the option for the users to just add the prefix and the tenant without anything extra as the rest is optional anyway, and for my plugin I don't need the extra attributes. From a plugin point of view, it would be good if we could point the quick_add view to a specific view, so we can subclass some of the core models for better customisation. ### Database changes N/A, just extending the current functionality of `quick_add`. ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:46:27 +01:00
adam closed this issue 2025-12-29 21:46:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 28, 2025):

When building a plugin, if I want to quick add a prefix for example, there are a lot extra attributes that I don't want my end users to see, nor do they need them. It would be good if I could customise the quick_add view.

This is not something we want to support in core NetBox. Plugins should not attempt to override the edit forms for core models, as it is likely to lead to user confusion and instability over time. Additionally, regarding the quick_add parameter specifically, the complexity this proposal would introduce would far exceed its general utility.

@jeremystretch commented on GitHub (Aug 28, 2025): > When building a plugin, if I want to quick add a prefix for example, there are a lot extra attributes that I don't want my end users to see, nor do they need them. It would be good if I could customise the quick_add view. This is not something we want to support in core NetBox. Plugins should not attempt to override the edit forms for core models, as it is likely to lead to user confusion and instability over time. Additionally, regarding the `quick_add` parameter specifically, the complexity this proposal would introduce would far exceed its general utility.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11531